problems doing 'the easy thing'

From: Date: Fri, 04 Nov 2005 16:39:18 +0000
Subject: problems doing 'the easy thing'
Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-2054@lists.php.net to get a copy of this message
Andrei, hi, Trying to make iter_next() work 'the PHP way', which should be simple. if (!gtk_tree_model_iter_next(GTK_TREE_MODEL(PHPG_GOBJECT(this_ptr)), iter)) { RETURN_FALSE; } phpg_gboxed_new(&php_iter, GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE TSRMLS_CC); // the bit that works php_gtk_build_value(&return_value, "(V)", php_iter); This doesn't work, because somehow the return value becomes an array containing the iter: array(1) { [0]=> object(GtkTreeIter)#4 (0) { } } Nor does removing the brackets (brackets provoke a call to php_gtk_build_hash()) help any because, although I'm seeing a result of some kind during the process when I try that, it doesn't make it as far as PHP land, full stop. I'm confused, because I see this precise function being used throughout the source in similar situations. Why should it work everywhere but here? nb I'm also confused because I don't see how while ($iter = iter_next($iter)) {...} can sensibly work anyway, even in PHP.... are you (and Pablo) sure I should even be trying this? - Steph

« previous php.gtk.dev (#2054) next »