GNOME Bugzilla – Bug 654785
Pango bindings - generated code contains errors
Last modified: 2011-07-17 21:33:28 UTC
Using something like Pango.Language.from_string("xx").get_sample_string(); results in "undefined reference to `pango_language_free'" during compilation. There is no pango_language_free function. The Pango docs say it should not be freed. Workaround Language * lang = Language.from_string("xx"); return lang->get_sample_string();
commit dded891b0650179092058258dbee94e54379ddd1 Author: Luca Bruno <lucabru@src.gnome.org> Date: Sun Jul 17 19:20:46 2011 +0200 pango: Mark return value of Language.from_string to be unowned Fixes regression introduced by commit 5d6c21cebd3c5a. Fixes bug 654785. This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
In my local vapi I also had to change public static unowned Pango.Language? from_string (string language); to public static unowned Pango.Language from_string (string language); for it to compile without errors. The metadata file also has "nullable=1" Thanks again.
(In reply to comment #2) > In my local vapi I also had to change > > public static unowned Pango.Language? from_string (string language); > > to > > public static unowned Pango.Language from_string (string language); > > for it to compile without errors. I don't know what errors you're talking about (maybe warnings), but nullable is correct.
Nevermind, this still doesn't work properly for me. I was still using the workaround function and didn't realize it. I get the same error as before with either changes. Sorry for the noise.