GNOME Bugzilla – Bug 642293
Incorrect parameter direction for "Pango.parse_markup" in "pango.vapi"
Last modified: 2011-03-11 00:28:40 UTC
The file "pango.vapi" defines the method "Pango.parse_markup" with the final parameter as "unichar accel_char". According to the Pango docs (http://library.gnome.org/devel/pango/unstable/pango-Text-Attributes.html#pango-parse-markup) I believe it should be "out unichar accel_path".
Created attachment 180827 [details] [review] patch for "pango.vapi"
I have the following test case: /* pango-test.vala */ int main (string[] args) { string markup = "<b>Hello, World!</b>"; Pango.AttrList attrs; string text; Pango.parse_markup (markup, -1, 0, out attrs, out text, null); stdout.printf ("%s\n", text); return 0; } When I try to compile this (with versions 0.10.0 and 0.11.5) I get: $ valac --pkg=pango pango-test.vala pango-test.vala:8.58-8.61: error: Argument 6: Cannot convert from `null' to `unichar' Pango.parse_markup (markup, -1, 0, out attrs, out text, null); ^^^^ Compilation failed: 1 error(s), 0 warning(s) After applying the attached patch for "pango.vapi" the test case compiles but I get a warning about another parameter: $ valac --pkg=pango pango-test.vala pango-test.vala:8.2-8.62: warning: unhandled error `GLib.Error' Pango.parse_markup (markup, -1, 0, out attrs, out text, null); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /home/graham/pango-test.vala.c: In function ‘_vala_main’: /home/graham/pango-test.vala.c:39: warning: passing argument 5 of ‘pango_parse_markup’ from incompatible pointer type /usr/include/pango-1.0/pango/pango-attributes.h:270: note: expected ‘char **’ but argument is of type ‘const gchar **’ Compilation succeeded - 1 warning(s) I'm not sure if the is another problem with the binding or a bug in my test case.
commit 5d6c21cebd3c5a4fdbf50cfa780729ba863c2909 Author: Michal Hruby <michal.mhr@gmail.com> Date: Fri Mar 11 01:27:31 2011 +0100 pango: Multiple binding fixes Fixes bug 642293.