Re: [Vala] Is the C code generated by valac compliant with C89, or C99?

2010-01-14 Thread Jürg Billeter
On Thu, 2010-01-14 at 15:57 +0800, Jerry Tan wrote: > Hi, all, > > I know that I can use gcc or sunstudio to compile C code which is > generated by valac, > > I just want to know that is there any compiler dependency, > for example, gcc extension, c99 support, > any requirement for gcc version

[Vala] [Genie] bug in array construction?

2010-01-14 Thread Denis Kuzmenok
row : string[] causes error: mysql.vala.c: In function ‘_main’: mysql.vala.c:25: error: array size missing in ‘row2’ mysql.vala.c:38: error: incompatible types in assignment row : string[]? causes error: error: syntax error, expected line end or semicolon but got `?' while Vala works fine with "[

Re: [Vala] Threads and async (was: Threads and closures problem)

2010-01-14 Thread JM
Hello Michael Could it be possible for vala to attach the callback to the right context via g_source_attach in the generated ccode? Regards Jörn Am Donnerstag, den 14.01.2010, 02:17 +0100 schrieb Michael 'Mickey' Lauer: > Looks like I spoke too soon. The attached program emits a wrong output: >

Re: [Vala] Threads and closures problem

2010-01-14 Thread Łukasz Pankowski
JM writes: > If I do the same thing with an Idle, the behavior is significantly > different, as the block data is not destroyed as soon as the run() > function is left. Why is that? > > Well working example: > > class HHH : Object { > public void run() { > string test = "test"

Re: [Vala] Threads and closures problem

2010-01-14 Thread JM
Hello all Thanks Łukasz for your reply! That explains the behavior. But then, shouldn't a thread also own the thread function or will that lead to other issues? Should the vapi binding be: public static weak Thread create (owned ThreadFunc func, bool joinable) throws ThreadError; instdead of: pu

Re: [Vala] Is the C code generated by valac compliant with C89, or C99?

2010-01-14 Thread pancake
There are still issues to make the C code compilable for visual studio[1] [1] https://bugzilla.gnome.org/show_bug.cgi?id=606838 I also found a problem in the swig trying to parse the .h files generated by vala. On 01/14/2010 09:45 AM, Jürg Billeter wrote: On Thu, 2010-01-14 at 15:57 +0800, J

Re: [Vala] Threads and async (was: Threads and closures problem)

2010-01-14 Thread Michael 'Mickey' Lauer
Hi Jörn, good suggestion, I think that could work. I have therefore created https://bugzilla.gnome.org/show_bug.cgi?id=606950 . Cheers, :M: ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] Threads and closures problem

2010-01-14 Thread JM
Hi all Looks like closures and threads are incompatible right now. This is the ccode generated from vala. VALA: Thread.create( ()=> { Thread.usleep(1000); print("in thread : %s \n", test); }, false); CCODE: g_thread_create (__lambda0__gthread_func, _data1_, FALSE, &_inner_error_); CCODE (with own

Re: [Vala] [Genie] bug in array construction?

2010-01-14 Thread Nicolas
Hi Denis, use this: row : array of string Regards, Nicolas. ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] [Genie] bug in array construction?

2010-01-14 Thread Nicolas
Hi Denis, use this: row : array of string Regards, Nicolas. ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

[Vala] Immutable variables

2010-01-14 Thread pancake
Is there a way to define them? I need it to solve some warnings for the vapis describing some C functions accepting const char* as argument. As I see in the compiler source is that it is not supported. Only for struct or class definitions with [Immutable]. Are there plans to support it for