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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Boxed types use g_boxed_free() to release resources, and g_boxed_copy() to copy them:
https://developer.gnome.org/gobject/stable/gobject-Boxed-Types.html

Ciao,
 Emmanuele.

On Sat, 9 Sep 2017 at 21:29, Stefan Salewski <mail@xxxxxxxxxxxx> wrote:
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
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list
--
https://www.bassi.io
[@] ebassi [@gmail.com]
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux