Re: [Vala] help with writting vapi...

2015-11-23 Thread Andre Masella
I would extend this idea to make it a little easier to write for the user: Create a binding as follows: [SimpleType] [CCode(cname = "struct timeval")] private struct TimeVal { [CCode(cname = "*")] public static TimeVal(Posix.timeval v); } private Redis.Context redisConnectWithTimeout(string ip,

Re: [Vala] help with writting vapi...

2015-11-22 Thread Al Thomas
> From: Matrix <pigex.zh...@gmail.com> > Sent: Sunday, 22 November 2015, 8:07 > Subject: [Vala] help with writting vapi... > > i'm writting hiredis vala's binding.. > > here is a function like this: > > redisContext *redisConnectWithTimeout(const char *ip, int

Re: [Vala] help with writting vapi...

2015-11-22 Thread Evan Nemerson
On Mon, 2015-11-23 at 01:03 +, Al Thomas wrote: > > From: Matrix <pigex.zh...@gmail.com> > > > Sent: Sunday, 22 November 2015, 8:07 > > Subject: [Vala] help with writting vapi... > > > > i'm writting hiredis vala's binding.. > > > >

Re: [Vala] help with writting vapi...

2015-11-22 Thread Evan Nemerson
On Sun, 2015-11-22 at 16:07 +0800, Matrix wrote: > Hi : > > i'm writting hiredis vala's binding.. > > here is a function like this: > > redisContext *redisConnectWithTimeout(const char *ip, int port, const > struct timeval tv); > > so, how to tell the valac that the 3rd param is struct value

[Vala] help with writting vapi...

2015-11-22 Thread Matrix
Hi : i'm writting hiredis vala's binding.. here is a function like this: redisContext *redisConnectWithTimeout(const char *ip, int port, const struct timeval tv); so, how to tell the valac that the 3rd param is struct value not struct pointer?