Re: [Vala] Constructors in VAPI

2009-09-23 Thread Treviño
Abderrahim Kitouni wrote: > 2009/9/22 Marco Trevisan : > > Abderrahim Kitouni wrote: > >> did you try to set [CCode (cname=g_new0)] for the constructor? You can > >> make it work somehow with such tricks. > > > > Yes, I tried but it doesn't work since it generates bad c code (with no > > parameters

Re: [Vala] Constructors in VAPI

2009-09-23 Thread Abderrahim Kitouni
Hi, 2009/9/22 Marco Trevisan : > Abderrahim Kitouni wrote: >> did you try to set [CCode (cname=g_new0)] for the constructor? You can >> make it work somehow with such tricks. > > Yes, I tried but it doesn't work since it generates bad c code (with no > parameters for g_new0) like: >        _tmp0_

Re: [Vala] Constructors in VAPI

2009-09-22 Thread Treviño
Abderrahim Kitouni wrote: > did you try to set [CCode (cname=g_new0)] for the constructor? You can > make it work somehow with such tricks. Yes, I tried but it doesn't work since it generates bad c code (with no parameters for g_new0) like: _tmp0_ = g_new0 (); > Alternatively, you can wri

Re: [Vala] Constructors in VAPI

2009-09-22 Thread Abderrahim Kitouni
Hi, 2009/9/22 Marco Trevisan : > 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

[Vala] Constructors in VAPI

2009-09-21 Thread Treviño
Hello, I've to define a constructor for a kind of "virtual class" that I'm defining in a VAPI. Practically I've some functions which can be applied to an int pointer, but I don't have a constructor (and I don't want to edit the C code), nor I want the developer to see that an int pointer is used a