Hi Jiri, I think it is a bug in glib-2.0.vapi.
Although it looks irrelevant, this patch solves your problem. - Yu On Sun, 2009-06-07 at 02:26 +0200, Jiří Zárevúcky wrote: > Hi, > > I'm trying to use GLib's markup parser, but I'm getting the following > error. Is that a bug or some mistake on my side? > > j...@jury-ubuntu:path$ valac Parser.vala -o Parser > path/Parser.vala.c: In function ‘test_parser_constructor’: > path/Parser.vala.c:168: error: ‘GMarkupParserStartElementFunc’ > undeclared (first use in this function) > path/Parser.vala.c:168: error: (Each undeclared identifier is reported only > once > path/Parser.vala.c:168: error: for each function it appears in.) > path/Parser.vala.c:168: error: expected ‘;’ before ‘_tmp1_’ > path/Parser.vala.c:169: error: ‘GMarkupParserEndElementFunc’ > undeclared (first use in this function) > path/Parser.vala.c:169: error: expected ‘;’ before ‘_tmp2_’ > path/Parser.vala.c:170: error: ‘GMarkupParserTextFunc’ undeclared > (first use in this function) > path/Parser.vala.c:170: error: expected ‘;’ before ‘_tmp3_’ > path/Parser.vala.c:171: error: ‘GMarkupParserErrorFunc’ undeclared > (first use in this function) > path/Parser.vala.c:171: error: expected ‘;’ before ‘_tmp4_’ > path/Parser.vala.c:174: error: ‘_tmp1_’ undeclared (first use in this > function) > path/Parser.vala.c:174: error: ‘GMarkupParser’ has no member named > ‘start_element_target’ > path/Parser.vala.c:175: error: ‘_tmp2_’ undeclared (first use in this > function) > path/Parser.vala.c:175: error: ‘GMarkupParser’ has no member named > ‘end_element_target’ > path/Parser.vala.c:176: error: ‘_tmp3_’ undeclared (first use in this > function) > path/Parser.vala.c:176: error: ‘GMarkupParser’ has no member named > ‘text_target’ > path/Parser.vala.c:177: error: ‘_tmp4_’ undeclared (first use in this > function) > path/Parser.vala.c:177: error: ‘GMarkupParser’ has no member named > ‘error_target’ > error: cc exited with status 256 > Compilation failed: 1 error(s), 0 warning(s) > > > Source code is attached... > _______________________________________________ > Vala-list mailing list > Vala-list@gnome.org > http://mail.gnome.org/mailman/listinfo/vala-list
--- /usr/share/vala/vapi/glib-2.0.vapi 2009-06-03 03:15:17.000000000 -0400 +++ glib-2.0.vapi 2009-06-07 13:36:20.000000000 -0400 @@ -2706,10 +2706,15 @@ public delegate void MarkupParserErrorFunc (MarkupParseContext context, Error error); public struct MarkupParser { + [CCode (delegate_target = false)] public MarkupParserStartElementFunc start_element; + [CCode (delegate_target = false)] public MarkupParserEndElementFunc end_element; + [CCode (delegate_target = false)] public MarkupParserTextFunc text; + [CCode (delegate_target = false)] public MarkupParserPassthroughFunc passthrough; + [CCode (delegate_target = false)] public MarkupParserErrorFunc error; }
_______________________________________________ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list