Il 17/12/2011 22:01, Evan Nemerson ha scritto:
On Sat, 2011-12-17 at 14:46 +0100, Giulio Paci wrote:
Il 16/12/2011 19:55, Rodrigo Herefeld ha scritto:
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
On Fri, Dec 16, 2011 at 07:17:11PM -0800, Dan Hitt wrote:
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.)
You don’t have to worry about
Il 16/12/2011 19:55, Rodrigo Herefeld ha scritto:
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
On Sat, 2011-12-17 at 14:46 +0100, Giulio Paci wrote:
Il 16/12/2011 19:55, Rodrigo Herefeld ha scritto:
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
isn't that a source of memory leak?
In the example provided by Rodrigo, where a C external function is called
directly from Vala code as such, (i.e. without ensuring that the (memory
allocated to the) string returned by the external function is automatically
managed by the glib Object model)
The following example seems to indicate that it is safe to call an external
function written in C, from a Vala source code, as long as the calling Vala
code knows how to free the memory associated with type of the return value
yielded by the C function.
I am not sure this is true irrespectively
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
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