Web lists-archives.com

Pango library seems to be really hard for gobject-introspection?

First I noticed that for pango_font_description_from_string()

>From /usr/share/gir-1.0/Pango-1.0.gir we know that transfer-
ownership="full" so we have to free it in our language bindings.

But how to guess the function for freeing?

For gobject there is generally a plain g_object_unref() necessary, and
there is even g_object_info_get_unref_function () available.

Well PangoFontDescription is Boxed type, does that help?

For all the data types with transfer-ownership="full" there seems to
exist in /usr/share/gir-1.0/Pango-1.0.gir: pango_attribute_destroy(),
pango_attr_list_unref(), pango_attr_iterator_destroy(),
pango_color_free() and more.

Well, my current guess would be to parse all methods of the pango data
types and use the one which contains free or destroy or unref in its
name? But that sounds a bit strange.

gtk-list mailing list