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

Hi, you should make unowned the array, like this:
[CCode (cheader_filename = "oslib/os.h")]
namespace OSLib
 [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.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]