Hi,

2011/5/18 Jan Spurný <[email protected]>:
>> Did you have any problem with the following? it should be the first
>> thing you try (and is likely the correct thing):
>>
>> [CCode (cheader_filename = "oldlib.h")]
>> public static GLib.List<X> old_lib_make_x_list();
>
> Thanks for your reply, but unfortunately, it really WAS the first thing I did
> - but because X is not reference counted, it resulted in errors like this:
>
> oldlib.vapi:61.33-61.36: error: duplicating X instance, use unowned variable 
> or explicitly invoke copy method
>        public static GLib.List<X> old_lib_make_x_list();
>                                ^

Yeah, this error message is misleading. You should put unowned in your
loop and not in the bindings, i.e.

foreach(unowned X myx in old_lib_make_x_list()) {
    ...
}

HTH,
Abderrahim
_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to