Re: GtkTreeView get_cursor patch

From: Date: Mon, 27 Feb 2006 16:25:06 +0000
Subject: Re: GtkTreeView get_cursor patch
References: 1 2 3  Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-2441@lists.php.net to get a copy of this message
Adam try to run the script with gdb and view the backtrace (bt command) On 2/27/06, Adam Lebsack <adam@ruffdogs.com> wrote: > > Andrei, > > That function is casing a segfault now.... After calling it a couple > times, it just crashes the program. My version didn't do this, and I > struggled to figure out why, but couldn't. That's probably why my > code was a bit ugly. :) > > Got any ideas? > > Thanks, > Adam > > On Feb 23, 2006, at 10:00 PM, Andrei Zmievski wrote: > > > Applied, with some modifications. > > > > -Andrei > > > > > > On Feb 14, 2006, at 8:57 AM, Adam Lebsack wrote: > > > >> Hey guys, > >> > >> 've been doing some development with php-gtk2 and I needed a > >> function implemented, so I uhhh... implemented it. It's > >> GtkTreeView::get_cursor. > >> > >> I've included the patch. Could we get this override into the CVS > >> tree? Thanks! > >> > >> Adam Lebsack > >> > >> --- php-gtk/ext/gtk+/gtktreeview.overrides 2006-02-13 > >> 20:09:54.000000000 -0700 > >> +++ php-gtk.patched/ext/gtk+/gtktreeview.overrides 2006-02-10 > >> 16:39:30.000000000 -0700 > >> @@ -1020,6 +1020,32 @@ > >> } > >> %% > >> +override gtk_tree_view_get_cursor > >> +PHP_METHOD > >> +{ > >> + GtkTreePath *path = NULL; > >> + GtkTreeViewColumn *column = NULL; > >> + zval *php_path = NULL, *php_column = NULL; > >> + > >> + NOT_STATIC_METHOD(); > >> + gtk_tree_view_get_cursor(GTK_TREE_VIEW(PHPG_GOBJECT > >> (this_ptr)), &path, &column); > >> + > >> + array_init(return_value); > >> + if (path) { > >> + phpg_tree_path_to_zval(path, &php_path TSRMLS_CC); > >> + phpg_gobject_new(&php_column, (GObject*)column > >> TSRMLS_CC); > >> + > >> + array_init(return_value); > >> + add_next_index_zval(return_value, php_path); > >> + add_next_index_zval(return_value, php_column); > >> + } else { > >> + RETURN_FALSE; > >> + //MAKE_STD_ZVAL(php_path); > >> + //MAKE_STD_ZVAL(php_column); > >> + } > >> +} > >> + > >> +%% > >> add-arginfo GtkTreeView get_path_at_pos > >> static > >> ZEND_BEGIN_ARG_INFO(ARGINFO_NAME, 0) > >> > >> > >> > >> -- > >> PHP-GTK Development Mailing List (http://gtk.php.net/) > >> To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > > PHP-GTK Development Mailing List (http://gtk.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > PHP-GTK Development Mailing List (http://gtk.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

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