Re: pango_script_get_sample_language()



g_boxed_free knows what to do because PangoLanguage has been registered as a boxed type:
https://git.gnome.org/browse/pango/tree/pango/pango-language.c?h=1.40.12&id=fd429398a64bc2d7a01da64efa736bbb6eec6a29#n145

Note that some records, e.g. PangoLogAttr, are not boxed types so you would't use the g_boxed_... functions for those. You would find that our sooner or later because there is no glib:get-type attribute for such records so you won't have a GType to give to g_boxed_[copy|free].


On 11/09/17 08:15, Stefan Salewski wrote:
https://developer.gnome.org/pango/stable/pango-Scripts-and-Languages.html#pango-script-get-sample-language

That function returns a pointer to PangoLanguage.

From

/usr/share/gir-1.0/Pango-1.0.gir

we have

<return-value transfer-ownership="full" nullable="1">

transfer-ownership="full" generally indicates that we have to free the
result. But I have no idea which function may be used for free.

My current guess would be that transfer-ownership="full" is just a bug.
But of course I may be wrong, maybe g_boxed_free() should be used?


_______________________________________________
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]