Hi Yu, On Thu, 2008-08-21 at 14:27 -0400, Yu Feng wrote: > I made a patch that allows embedding c code snippet in vala source. > > http://bugzilla.gnome.org/show_bug.cgi?id=548897 > > This is quite primitive and more has to be done, especially to translate > the vala variable names to cnames. > > I would like to analogue this with embedding asm code in c. :-)
C doesn't support inline assembly code. Some C compilers support inline assembly but that's a compiler-specific extension to the C language. I will certainly not add support for inline C code to the Vala language. It's of course possible to support it using backend-specific attributes as you did in your patch. I don't think that this is sensible for embedding C code into your Vala application, though. Using the `extern' modifier is a better way to do this. > Another direction of this patch is to allow small wrapping code in > the .vapi declarations (which might ease the vapi authors's life) This is the only place where I might consider it useful. However, so far I'm not convinced that it really helps, see my other response. Jürg _______________________________________________ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list