Re: [Vala] Generating vapi file for a simple struct
- From: Matías De la Puente <mfpuente ar gmail com>
- To: Jan-Jaap van der Geer <jjvdgeer inbox com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Generating vapi file for a simple struct
- Date: Sun, 17 May 2009 19:13:50 -0300
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.
Matias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]