[Vala] Sharing a trick to use some C macros in VALA
- From: Yu Feng <rainwoodman gmail com>
- To: vala-list <vala-list gnome org>
- Subject: [Vala] Sharing a trick to use some C macros in VALA
- Date: Sun, 01 Nov 2009 01:00:05 -0400
Dear list,
I found this trick today, in case it is not already dinosaur..
[CCode (cname="G_STRUCT_OFFSET(MyBaseClassClass, my_function)")]
extern const int MyFunctionOffset;
basically you can call in this way any c macros that are otherwise not
directly bindable to vala, given that the return type of the macro is
known.
- Yu
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]