[Vala] nullable structs unreferenced?



Hi all,
while trying to write a TreeModel implementation, I found that the method:
public bool iter_nth_child (out Gtk.TreeIter iter, weak Gtk.TreeIter parent, int n)

from gtk+-2.0.vapi should be:
public bool iter_nth_child (out Gtk.TreeIter iter, weak Gtk.TreeIter? parent, int n)

I made locally this modification but I still have the problem that:
   if ( ref parent != null)

gets translated into:
   parent = *_parent_p; //segfaults here
   if (&parent != NULL)

Is there any "pointer magic" I can do with Vala to get around this..?
Could be that the problem that TreeIter is a struct, not a GObject? I didn't had this problem with with objects though..

Thank you,
Vlad



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