Thanks you guys for the help.
I use my own modified version of gio.vapi and remove the *_finish
functions from those interfaces. Then, it works.
Although I don't know why it works. Thank you again.

On Sat, Mar 27, 2010 at 5:56 AM, Jan Hudec <b...@ucw.cz> wrote:
> On Sat, Mar 27, 2010 at 03:57:26 +0800, PCMan wrote:
>> > So, the problem is that the function return values are falsely
>> > marked as unowned in the VAPI. I reported a bug for it at
>> > https://bugzilla.gnome.org/show_bug.cgi?id=614044
>> >
>> >> However, with Vala, how can I make vala methods return a "newly
>> >> allocated GList" with all objects in it having increased ref_count?
>> >> Automatic ref couting management in Vala is handy if you only use it
>> >> in Vala but I find it difficult to make things right when interfacing
>> >> with C code. I need to check the generated C code to see if it does
>> >> what I really want. Any better guide for this? Already read Vala
>> >> tutorial, but I still haven't get it.
>> > Just don't mark the list as unowned.
>>
>> But in the glib2 vapi, prototype of that API has 'unowned', but in C,
>> the returned list should be freed by the caller. So how can I override
>> this method in correct way?
>
> The bug in the vapi has to be fixed.
>
> --
>                                                 Jan 'Bulb' Hudec <b...@ucw.cz>
>
_______________________________________________
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to