Re: [Vala] Constructors in VAPI



Hi,

2009/9/22 Marco Trevisan <mail 3v1n0 net>:
With Vala 0.7.6 I can't any more define a such class, since I'm asked
for a constructor, and if I add an empty one I get a linking error since
vala tries to use the invalid C function prefix_my_virtual_class_new()
as constructor, instead of a simple gnew0 for generating the int
pointer.

did you try to set [CCode (cname=g_new0)] for the constructor? You can
make it work somehow with such tricks.

Alternatively, you can write the C function
prefix_my_virtual_class_new to just call g_new0.

HTH,
Abderrahim



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