On Sun, 2009-11-29 at 00:38 +0100, pHilipp Zabel wrote:
> > vapi binding:
> >
> > public class SomeStruct {
> > [CCode (array_param_name?...)] // what should this be ?
>
> [CCode (array_length_name = "dataLength", array_length_type = "size_t")]
>
> Not sure if that should be size_t or gsize.
I have something related. I have the following struct in C:
typedef struct
{
int errnum;
char errmess[252];
} os_error;
Right now I have this vapified like this:
[CCode (cname == "os_error")]
public struct error
{
public unowned int errnum;
public unowned char[] errmess;
}
However, when accessing the error.errmess.length I get compilation
errors (in C,, not in Vala. error: 'os_error' has no member named
'errmess_length1'). I suppose this is due to a problem in the vapi, but
I am not really sure how to tell Vala the length is 252 bytes.
I tried prefixing the errmess member with:
[CCode (array_length_name = "252", array_length_type = "int")]
but that did not seem to make a difference.
Any ideas?
Cheers,
Jan-Jaap
____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list