Re: [Vala] Generating vapi file for a simple struct

2009-05-17 Thread Matías De la Puente
Hi, you should make unowned the array, like this: > [CCode (cheader_filename = "oslib/os.h")] > namespace OSLib > { > //[SimpleType] > //[Compact] > [CCode (cname = "os_error", cprefix = "", clower_case_prefix = "")] > public struct OSError { >public int errnum; >public unowned char

Re: [Vala] Generating vapi file for a simple struct

2009-05-17 Thread Jan-Jaap van der Geer
"Michael 'Mickey' Lauer" wrote: > Watch out for the usage of cprefix and clower_case_prefix > annotations, e.g. try setting both of them to "" for your > example. Thanks, but it does not seem to solve the problem. It does change it somewhat, though. My vapi now looks like this: [CCode (cheader

Re: [Vala] Generating vapi file for a simple struct

2009-05-17 Thread Michael 'Mickey' Lauer
Watch out for the usage of cprefix and clower_case_prefix annotations, e.g. try setting both of them to "" for your example. :M: ___ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

[Vala] Generating vapi file for a simple struct

2009-05-17 Thread Jan-Jaap van der Geer
Hello, I am quite new to Vala. I have ported it to RISC OS but for it to be of any use I want it to talk to a library called OSLib. Just to get me started, I tried to create a vapi file for a very common struct for errors, but I am having difficulties and I haven't found any relevant documentatio

Re: [Vala] Cairo example for old gtk (2.12.9)

2009-05-17 Thread Qball Cow
I would like to make a correction here, the file is not written by me, but by malept. Q. Харин Роман wrote: Thanks to Qball Cow and #vala, there are already exists file: http://repo.or.cz/w/gmpc.git?a=blob;f=src/gtktransition.h;h=c4a05eb9b61da8ee3efcdecab469f499cadbbbf1;hb=HEAD pancake пишет:

Re: [Vala] Cairo example for old gtk (2.12.9)

2009-05-17 Thread Харин Роман
Thanks to Qball Cow and #vala, there are already exists file: http://repo.or.cz/w/gmpc.git?a=blob;f=src/gtktransition.h;h=c4a05eb9b61da8ee3efcdecab469f499cadbbbf1;hb=HEAD pancake пишет: > You need gtk 2.14 to get this symbol. You can also implementit in a > define because it's just an accessor to

[Vala] Cairo example for old gtk (2.12.9)

2009-05-17 Thread Харин Роман
Hi, dear list Today i try to test Cairo example http://live.gnome.org/Vala/CairoSample. But in Ubuntu hardy (8.4.2) Gtk have version 2.12.9. This lead to this sample became uncompilable. /tmp/ccWdOcX9.o: In function `cairo_sample_on_expose': main.vala.c:(.text+0x11b): undefined reference to `gtk

Re: [Vala] more posix for 0.7.3 release

2009-05-17 Thread Michael 'Mickey' Lauer
Hi Jürg, > TIOCM_* and ptsname_r appear to be Linux and GNU-specific, respectively. > Maybe it makes more sense to add them to the linux vapi. Right. I will do that and come back with a new patchset. Thanks, :M: ___ Vala-list mailing list Vala-list@g

Re: [Vala] more posix for 0.7.3 release

2009-05-17 Thread Jürg Billeter
Hi Mickey, On Sat, 2009-05-16 at 01:06 +0200, Michael 'Mickey' Lauer wrote: > thanks for applying all the posix enhancements, I could reduce my diff a lot > :) > > Here's some more which you might want to review, on top of master: > > http://git.freesmartphone.org/?p=vala- > lang.git;a=shortlo

[Vala] Fwd: Delegate with out parameters are not working within lambdas

2009-05-17 Thread Mike Massonnet
Hi, When using this code: |public delegate void SampleFunc (int a, out int x); | |void f1 (int a, out int x) { |       print ("a %d\n", a); |       x = a * 10; |} | |void f2 (SampleFunc func, int a) { |       int x; |       func (a, out x); |       print ("x %d\n", x); |} | |static int main (stri