I've re-read the vala docs on weak references and ownership transfer:
http://live.gnome.org/Vala/Tutorial#head-e667accbcd04f19dd6a2c14a68e22b3cc2179e58

The reference counting that "vala" supports is only for gobject; which
is fine, but the glib vapi file shows that this is done by the vapi file
and not by vala as such.

[CCode (ref_function = "g_object_ref", unref_function =
"g_object_unref", marshaller_type_name = "OBJECT", get_value_function =
"g_value_get_object", set_value_function = "g_value_set_object",
cheader_filename = "glib-object.h")]

I'll want to introduce a new object base for Samba4 that uses talloc
functions to do this, and it looks like I can; and so I plan to, but I
invite wiser folk to comment first:

1. are these CCode attributes inherited to subclasses?
2. are their any secrets pertaining to the C code generated by '#' and
'weak' and the CCode attributes above that would be helpful for me to know?
3. what does get_value_function do, and what Vala code makes use of it?
4. do I need to worry about *marshaller_type_name*?

Thanks

Sam
_______________________________________________
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to