[PATCH] GtkNotebook-related stuff

From: Date: Sat, 17 Sep 2005 15:10:04 +0000
Subject: [PATCH] GtkNotebook-related stuff
Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-1658@lists.php.net to get a copy of this message
Hi Andrei, I know this isn't a brilliant attempt, but it allows the signal that was prevented from working, to work. It seems safer to return a long than anything else. I can't find a way to check what the pointer's actually pointing _to_, otherwise it'd be able to cope with strings, objects, arrays, etc. But as far as I recollect, the only place the lack of gpointer support hurt PHP-GTK 1 was in this single GtkNotebook signal. All the PHP-GTK 2 demo and test scripts I have at my disposal still work with the patch applied. Should I commit it, or does it require further investigation? - Steph

Index: main/phpg_gvalue.c =================================================================== RCS file: /repository/php-gtk/main/phpg_gvalue.c,v retrieving revision 1.23 diff -u -r1.23 phpg_gvalue.c --- main/phpg_gvalue.c 2 Sep 2005 09:16:55 -0000 1.23 +++ main/phpg_gvalue.c 16 Sep 2005 19:46:16 -0000 @@ -173,6 +173,13 @@ break; } + case G_TYPE_POINTER: + { + MAKE_ZVAL_IF_NULL(*value); + ZVAL_LONG(*value, (long)g_value_get_pointer(gval)); + break; + } + default: php_error(E_WARNING, "PHP-GTK internal error: unsupported type %s", g_type_name(G_VALUE_TYPE(gval))); MAKE_STD_ZVAL(*value);
« previous php.gtk.dev (#1658) next »