Re: [Vala] Preprocessing directives in glib-2.0.vapi



Hello,

2011/5/12 JM <interflug1 gmx net>:
Hello
In glib-2.0.vapi the binding for a GMappedFile looks like this:

[...]
The new unref_function is for glib versions higher than 2.22 (according
to documentation). I have 2.28.

Is the developer supposed to give the condition GLIB_2_22 himself? Or is
the vala compiler supposed to do that?
At least I can say that it is now only working correctly, if I add the
-D GLIB_2_22 to the compiler args myself.

You're not supposed to define it directly, rather you set
--target-glib, and valac will define all the GLIB_2_xx variables up to
the target version (starting from 2.14 IIRC)

HTH,
Abderrahim



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]