Re: Pango library seems to be really hard for gobject-introspection?
- From: Emmanuele Bassi <ebassi gmail com>
- To: Stefan Salewski <mail ssalewski de>, "gtk-list gnome org" <gtk-list gnome org>
- Subject: Re: Pango library seems to be really hard for gobject-introspection?
- Date: Sat, 09 Sep 2017 21:46:58 +0000
Boxed types use g_boxed_free() to release resources, and g_boxed_copy() to copy them:
Ciao,
Emmanuele.
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 gnome org
https://mail.gnome.org/mailman/listinfo/gtk-list
--
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]