Re: [Vala] Too many arguments in generated code




Compact classes are 100% C structs(no GObject at all).
The difference is that compact class are threaded as a ref types, while structs
are threaded as a value types.
If the struct is used most of the time by ref type, it logically makes sense to
define it as compact class.
Compact class is logically the same as C++(with ownership transfer)

Tal

From: tomw ubilix com
To: simon werbeck googlemail com
Date: Wed, 11 Apr 2012 08:28:38 +0200
CC: vala-list gnome org
Subject: Re: [Vala] Too many arguments in generated code


So in your case I would bind Joint as
[Compact]
[CCode (copy_function="...", free_function="...")]
class Skeltrack.Joint {...}

thanks, following your suggestion works. What I don't get however is why
Vala requires a class to get it right where the in the original C code
Skeltrack.Joint is a struct.

--tomw

  

_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
                                          


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