Pango library seems to be really hard for gobject-introspection?
- Date: Sat, 09 Sep 2017 21:28:50 +0200
- From: Stefan Salewski <mail@xxxxxxxxxxxx>
- Subject: 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_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