[Vala] C Integration, it's cool

2011-12-16 Thread Rodrigo Herefeld
I've found a goodie, i needed to use libcurl in a vala program, just to fetch a file regulary from the internet, after some searching i end up doing that: i write all the curl thing in a c program , then i wrote a function that makes the connection and return the content of the file. in vala i

Re: [Vala] using Variant: memory leaks

2011-12-16 Thread Luca Dionisi
On Fri, Dec 16, 2011 at 3:23 PM, Luca Dionisi luca.dion...@gmail.com wrote: Hi folks I am using Vala 0.12 This simple function leaks memory void leaks() {    Variant v = hello;    string s = (string)v; } I am doing other investigations with Variant and memory leaks. This time, always

Re: [Vala] C Integration, it's cool

2011-12-16 Thread Dan Hitt
Thanks Rodrigo for posting!!! I tried your technique and i can pass at least integers and strings (as const char*) to software written in c. (I have not tried sending across large amounts of data in arrays, or anything like that.) Is this written up on http://valadoc.org anywhere? (I tried a

Re: [Vala] Debugging

2011-12-16 Thread PCMan
I believe that he is talking about reading generated C code during debugging. When there is a crash, gdb listed generated C code rather than vala source. As everyone knows, the C code generated by vala is not quite readable and contains quite a lot of temporary variables, which makes debugging

Re: [Vala] Can adding new virtual method break ABI?

2011-12-16 Thread PCMan
If you need to do these things manually, then what's the point in using vala? It's the job of compilers. People who like to do the job of compilers manually should use GObject/C instead. Manually filling a virtual function table and calculate offset of pointers are really of fun. lol Creating some