Have you made your modifications by hand?

Is much better to modify gtk-doc annotations[1] in order to generate correct
GIR files, this will help other languages as well like python, JavaScript
and other supporting GObjectIntrospection, including Vala. Or use a
Meta-3.0.metadata[2] in order to tell vapi generator to create correct vapi,
including header files to use[3].

I don't really know but Vala may is switching to GIR. Vala's compiler search
for GIR/TYPLIB when --pkg request a package like:

valac --pkg Meta-3.0 test.vala

will search on {prefix}/share/gir-1.0/ directory for Meta-3.0.gir package,
parse it automatically (including its dependencies) and them compiles. It
sends lot of CRITICAL messages on vala_gir_parser_* and other functions, but
they will be seen even when generating VAPI files, because they come from
Vala's GIR parser.

Take the last and search just Error messages on VAPI generation, they are
more useful than the CRITICAL ones.

See at:

[1] http://live.gnome.org/GObjectIntrospection/Annotations
[2] http://live.gnome.org/Vala/Manual/GIR%20metadata%20format
[3] http://git.gnome.org/browse/libgda/tree/libgda/Gda-5.0.metadata


2011/10/10 Andrew Higginson <at.higgin...@gmail.com>

> Hi,
>
> First off, thanks so much for everyone's help so far on this :)
>
> Once I removed those incorrect <package> lines and excluded those X11
> methods  I got a vapi that looks like this:
>    http://pastebin.com/wq1dtK0y
>
> I then replaced the cheader_filename = "Meta-3.0.h" with header files
> that actually exist, and added the methods load() and get_current() to
> the Meta.Theme struct, as well as changing the parameter 'button_states'
> of Meta.Theme.draw_frame() to be a Meta.ButtonState[]
>
> This gave me a vapi file like so:
>    http://pastebin.com/Mkf59c1p
>
> Now I have actually tried to use it and that's where the problems arise :)
>
> I have compiled and tried to run the following piece of code:
>    http://pastebin.com/aPLr3Nak
>
> With the command:
>    valac -g --save-temps --pkg gtk+-3.0 --pkg libmutter --pkg
> clutter-1.0 --vapidir=. window.vala
>
> Which generates the .c file:
>    http://pastebin.com/Yaf1iYm2
>
> And it crashes with a Segmentation Fault, with the following backtrace:
>    http://pastebin.com/yyNyTZx1
>
> The respective .c and .h files for meta_theme_draw_frame and related
> functions are available:
>    http://pastebin.com/taFeLdcm
>    http://pastebin.com/vkbCN9z6
>
> I guess something is wrong with the vapi?
>
> Thanks,
>
> --
> Andrew
> _______________________________________________
> vala-list mailing list
> vala-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/vala-list
>
_______________________________________________
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to