Matías De la Puente <[email protected]> wrote:

> 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[252] errmess;
> >  }
> > }

> If you put some memory managed objects in a struct (strings,
> arrays, Objects, etc) they have to be destroyed, but i you don't
> have that you should put unowned to that objects.

Thanks, that worked perfectly! :-)

Is there any need for the cprefix and clower_case_prefix in this
case? I get the impression that they are not used as long as I
specify the cname itself.

Cheers,
Jan-Jaap
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to