On Thu, Apr 5, 2012 at 4:53 PM, tomw <t...@ubilix.com> wrote: > Hi, > > I'm about to port the Skeltrack [1] skeleton tracker to Vala. So far > everything works fine, except getting the actual joints from the joint > list. The code in C is pretty straight forward: > > head = skeltrack_joint_list_get_joint (list, > SKELTRACK_JOINT_ID_HEAD); > > which in Vala is: > > var head = JointList.get_joint(list, Skeltrack.JointId.HEAD); > > The generated code from Vala however looks like: > > skeltrack_joint_list_get_joint (list, SKELTRACK_JOINT_ID_HEAD, &_tmp2_); > head = _tmp2_; > > which makes the compiler complain that there are too many arguments. > > The respective part in the vapi looks like: > > [CCode (cheader_filename = "skeltrack.h")] > [SimpleType] > public class JointList { > public static void free (Skeltrack.JointList list); > public static Skeltrack.Joint get_joint > (Skeltrack.JointList list, Skeltrack.JointId id); > } > > > Any clue why that happens? >
Why not do it like this? [CCode (cheader_filename = "skeltrack.h",free_function"joint_list_free")] [SimpleType] public class JointList { public Skeltrack.Joint get_joint(Skeltrack.JointId id); } I think this is the proper way to do it. > > thanks, > > --tomw > > [1] https://github.com/joaquimrocha/Skeltrack.git > > _______________________________________________ > vala-list mailing list > vala-list@gnome.org > http://mail.gnome.org/mailman/listinfo/vala-list >
_______________________________________________ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list