Re: [patch] GtkScaleButton Methods
| From: | Andrei Zmievski | Date: | Wed, 23 Jan 2008 18:01:58 +0000 |
| Subject: | Re: [patch] GtkScaleButton Methods | ||
| References: | 1 2 3 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-4091@lists.php.net to get a copy of this message | ||
Should be fine.
Bob Majdak Jr wrote:
Using only GCC I would never notice (or care really :z). How do these other compilers feel about basic pointer arithmetic? list = g_malloc0(sizeof(gchar *) * (listlen + 2)); //. space for not overwriting the head pointer and leaving a null on //. the tail end. --- gtk_scale_button_set_icons(GTK_SCALE_BUTTON(button), (const gchar **)(list+1)); --- if(list) {g_strfreev(list);} Andrei Zmievski wrote:We shouldn't use C99's syntax, since not all compilers support it. I'm talking about initializing an array from a non-const value. -Andrei+ if(iconlist) + listlen = zend_hash_num_elements(Z_ARRVAL_P(iconlist)); + else + listlen = 0;++ gchar *list[listlen+1]; + iter = 0;