[Vala] Using --enable-mem-profiler

2015-03-03 Thread Robert Schroll
Hi all, I'm attempting to use --enable-mem-profiler to allow me to use mem_profile() in a Vala program. However, I'm getting errors related to realloc() as soon as I attempt to create any new objects. What am I doing wrong? I have a simple test program (mem-test.vala): public int main(str

Re: [Vala] How does IOError.from_errno works?

2015-03-03 Thread Andre Masella
You may do the following little dance to make it work: throw new Error(IOError.quark(), (int) IOError.from_errno(x), strerror(x)); where x is your error number. On 3 March 2015 at 03:45, Guillaume Poirier-Morency < guillaumepoiriermore...@gmail.com> wrote: > I would like to convert errors comin

Re: [Vala] How does IOError.from_errno works?

2015-03-03 Thread Luca Bruno
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/03/2015 09:45, Guillaume Poirier-Morency wrote: > I would like to convert errors coming from some bindings to appropriate > IOError using errno codes. > > http://valadoc.org/#!api=gio-2.0/GLib.IOError.from_errno > > I have tried the following: >

[Vala] How does IOError.from_errno works?

2015-03-03 Thread Guillaume Poirier-Morency
I would like to convert errors coming from some bindings to appropriate IOError using errno codes. http://valadoc.org/#!api=gio-2.0/GLib.IOError.from_errno I have tried the following: throw IOError.from_errno (this.err.get_error ()); But I get the following complication error: