cvs: php-gtk /ext/gtk+ gdk.overrides gtk.overrides php_gtk+.h php_gtk+_types.c

[email protected] ("Frank M. Kromann")
Newsgroups php.gtk
Message-ID <cvsfmk996539821@cvsserver>
fmk		Mon Jul 30 20:37:01 2001 EDT

  Modified files:              
    /php-gtk/ext/gtk+	php_gtk+_types.c php_gtk+.h gtk.overrides 
                     	gdk.overrides 
  Log:
  Fixing ZTS compilation
fmk-20010730203701.txt (text/plain, 29.3 KB)
Index: php-gtk/ext/gtk+/php_gtk+_types.c
diff -u php-gtk/ext/gtk+/php_gtk+_types.c:1.6 php-gtk/ext/gtk+/php_gtk+_types.c:1.7
--- php-gtk/ext/gtk+/php_gtk+_types.c:1.6	Mon Jul 30 01:11:15 2001
+++ php-gtk/ext/gtk+/php_gtk+_types.c	Mon Jul 30 20:37:00 2001
@@ -18,7 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-/* $Id: php_gtk+_types.c,v 1.6 2001/07/30 05:11:15 andrei Exp $ */
+/* $Id: php_gtk+_types.c,v 1.7 2001/07/31 00:37:00 fmk Exp $ */
 
 #include "php_gtk.h"
 
@@ -425,7 +425,7 @@
 
 			default:
 				php_error(E_WARNING, "%s() got property format != 8, 16, or 32",
-						  get_active_function_name());
+						  get_active_function_name(TSRMLS_C));
 				break;
 		}
 		g_free(data);
@@ -463,7 +463,7 @@
 	switch (format) {
 		case 8:
 			if (Z_TYPE_P(php_data) != IS_STRING) {
-				php_error(E_WARNING, "%s() expects data to be a string for format=8", get_active_function_name());
+				php_error(E_WARNING, "%s() expects data to be a string for format=8", get_active_function_name(TSRMLS_C));
 				return;
 			}
 			data = Z_STRVAL_P(php_data);
@@ -477,7 +477,7 @@
 				int i;
 
 				if (Z_TYPE_P(php_data) != IS_ARRAY) {
-					php_error(E_WARNING, "%s() expects data to be an array for format=16", get_active_function_name());
+					php_error(E_WARNING, "%s() expects data to be an array for format=16", get_active_function_name(TSRMLS_C));
 					return;
 				}
 				n_elements = zend_hash_num_elements(Z_ARRVAL_P(php_data));
@@ -499,7 +499,7 @@
 				int i;
 
 				if (Z_TYPE_P(php_data) != IS_ARRAY) {
-					php_error(E_WARNING, "%s() expects data to be an array for format=32", get_active_function_name());
+					php_error(E_WARNING, "%s() expects data to be an array for format=32", get_active_function_name(TSRMLS_C));
 					return;
 				}
 				n_elements = zend_hash_num_elements(Z_ARRVAL_P(php_data));
@@ -515,7 +515,7 @@
 			break;
 
 		default:
-			php_error(E_WARNING, "%s() expects format to be 8, 16, or 32", get_active_function_name());
+			php_error(E_WARNING, "%s() expects format to be 8, 16, or 32", get_active_function_name(TSRMLS_C));
 			break;
 	}
 
@@ -601,7 +601,7 @@
 	wrapped_obj = gdk_pixmap_new(window, (gint)width, (gint)height, (gint)depth);
 	if (!wrapped_obj) {
 		php_error(E_WARNING, "%s(): could not create GtkWindow object",
-				  get_active_function_name());
+				  get_active_function_name(TSRMLS_C));
 		return;
 	}
 
@@ -796,11 +796,11 @@
 
 	if (!php_gtk_parse_args_quiet(ZEND_NUM_ARGS(), "hhh", &color.red, &color.green, &color.blue)) {
 		if (!php_gtk_parse_args_quiet(ZEND_NUM_ARGS(), "s", &color_spec)) {
-			php_error(E_WARNING, "%s() requires a color spec or RGB triplet", get_active_function_name());
+			php_error(E_WARNING, "%s() requires a color spec or RGB triplet", get_active_function_name(TSRMLS_C));
 			php_gtk_invalidate(this_ptr);
 			return;
 		} else if (!gdk_color_parse(color_spec, &color)) {
-			php_error(E_WARNING, "%s() could not parse color spec '%s'", get_active_function_name(), color_spec);
+			php_error(E_WARNING, "%s() could not parse color spec '%s'", get_active_function_name(TSRMLS_C), color_spec);
 			php_gtk_invalidate(this_ptr);
 			return;
 		}
@@ -907,10 +907,10 @@
 
 	if (!php_gtk_parse_args_quiet(ZEND_NUM_ARGS(), "hhh|bb", &color.red, &color.green, &color.blue, &writeable, &best_match)) {
 		if (!php_gtk_parse_args_quiet(ZEND_NUM_ARGS(), "s|bb", &color_spec, &writeable, &best_match)) {
-			php_error(E_WARNING, "%s() requires a color spec or RGB triplet", get_active_function_name());
+			php_error(E_WARNING, "%s() requires a color spec or RGB triplet", get_active_function_name(TSRMLS_C));
 			return;
 		} else if (!gdk_color_parse(color_spec, &color)) {
-			php_error(E_WARNING, "%s() could not parse color spec '%s'", get_active_function_name(), color_spec);
+			php_error(E_WARNING, "%s() could not parse color spec '%s'", get_active_function_name(TSRMLS_C), color_spec);
 			return;
 		}
 	}
@@ -1011,14 +1011,6 @@
 	{NULL, NULL, NULL}
 };
 
-inline GdkAtom php_gdk_atom_get(zval *wrapper)
-{
-	zval **atom;
-	
-	zend_hash_find(Z_OBJPROP_P(wrapper), "atom", sizeof("atom"), (void**)&atom);
-	return (GdkAtom)Z_LVAL_PP(atom);
-}
-
 zval *php_gdk_atom_new(GdkAtom atom)
 {
 	zval *result;
@@ -1322,14 +1314,14 @@
 	while (zend_hash_get_current_data(hash, (void**)&temp) == SUCCESS) {
 		if (Z_TYPE_PP(temp) != IS_LONG) {
 			php_error(E_WARNING, "%s() expects array elements to be integers",
-					  get_active_function_name()); 
+					  get_active_function_name(TSRMLS_C)); 
 			g_free(dash_list);
 			return;
 		}
 		dash_list[i] = (guchar)Z_LVAL_PP(temp);
 		if (dash_list[i] == 0) {
 			php_error(E_WARNING, "%s() expects array elements to be non-zero",
-					  get_active_function_name()); 
+					  get_active_function_name(TSRMLS_C)); 
 			g_free(dash_list);
 			return;
 		}
@@ -2493,6 +2485,7 @@
 void php_gtk_plus_register_types(int module_number)
 {
 	zend_class_entry ce;
+	TSRMLS_FETCH();
 
 	le_php_gtk_wrapper = zend_register_list_destructors_ex(NULL, NULL, "Generic PHP-GTK wrapper", module_number);
 	le_gdk_window = zend_register_list_destructors_ex(release_gdk_window_rsrc, NULL, "GdkWindow", module_number);
@@ -2508,81 +2501,81 @@
 	le_gtk_style = zend_register_list_destructors_ex(release_gtk_style_rsrc, NULL, "GtkStyle", module_number);
 
 	INIT_CLASS_ENTRY(ce, "gdkevent", php_gdk_event_functions);
-	gdk_event_ce = zend_register_internal_class_ex(&ce, NULL, NULL);
+	gdk_event_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
 
 	INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkwindow", php_gdk_window_functions, NULL, php_gtk_get_property, php_gtk_set_property);
-	gdk_window_ce = zend_register_internal_class_ex(&ce, NULL, NULL);
+	gdk_window_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
 	INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkpixmap", php_gdk_pixmap_functions, NULL, php_gtk_get_property, php_gtk_set_property);
-	gdk_pixmap_ce = zend_register_internal_class_ex(&ce, NULL, NULL);
+	gdk_pixmap_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
 	INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkbitmap", php_gdk_window_functions, NULL, php_gtk_get_property, php_gtk_set_property);
-	gdk_bitmap_ce = zend_register_internal_class_ex(&ce, NULL, NULL);
+	gdk_bitmap_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
 	php_gtk_register_prop_getter(gdk_window_ce, gdk_window_get_property);
 	php_gtk_register_prop_getter(gdk_pixmap_ce, gdk_window_get_property);
 	php_gtk_register_prop_getter(gdk_bitmap_ce, gdk_window_get_property);
 
 	INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkcolor", php_gdk_color_functions, NULL, php_gtk_get_property, php_gtk_set_property);
-	gdk_color_ce = zend_register_internal_class_ex(&ce, NULL, NULL);
+	gdk_color_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
 	php_gtk_register_prop_getter(gdk_color_ce, gdk_color_get_property);
 	php_gtk_register_prop_setter(gdk_color_ce, gdk_color_set_property);
 
 	INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkcolormap", php_gdk_colormap_functions, NULL, php_gtk_get_property, php_gtk_set_property);
-	gdk_colormap_ce = zend_register_internal_class_ex(&ce, NULL, NULL);
+	gdk_colormap_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
 	php_gtk_register_prop_getter(gdk_colormap_ce, gdk_colormap_get_property);
 
 	INIT_CLASS_ENTRY(ce, "gdkatom", php_gdk_atom_functions);
-	gdk_atom_ce = zend_register_internal_class_ex(&ce, NULL, NULL);
+	gdk_atom_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
 	
 	INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkcursor", php_gdk_cursor_functions, NULL, php_gtk_get_property, php_gtk_set_property);
-	gdk_cursor_ce = zend_register_internal_class_ex(&ce, NULL, NULL);
+	gdk_cursor_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
 	php_gtk_register_prop_getter(gdk_cursor_ce, gdk_cursor_get_property);
 	
 	INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkvisual", php_gdk_visual_functions, NULL, php_gtk_get_property, php_gtk_set_property);
-	gdk_visual_ce = zend_register_internal_class_ex(&ce, NULL, NULL);
+	gdk_visual_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
 	php_gtk_register_prop_getter(gdk_visual_ce, gdk_visual_get_property);
 
 	INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkfont", php_gdk_font_functions, NULL, php_gtk_get_property, php_gtk_set_property);
-	gdk_font_ce = zend_register_internal_class_ex(&ce, NULL, NULL);
+	gdk_font_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
 	php_gtk_register_prop_getter(gdk_font_ce, gdk_font_get_property);
 
 	INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkgc", php_gdk_gc_functions, NULL, php_gtk_get_property, php_gtk_set_property);
-	gdk_gc_ce = zend_register_internal_class_ex(&ce, NULL, NULL);
+	gdk_gc_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
 	php_gtk_register_prop_getter(gdk_gc_ce, gdk_gc_get_property);
 	php_gtk_register_prop_setter(gdk_gc_ce, gdk_gc_set_property);
 
 	INIT_OVERLOADED_CLASS_ENTRY(ce, "gdkdragcontext", php_gdk_drag_context_functions, NULL, php_gtk_get_property, php_gtk_set_property);
-	gdk_drag_context_ce = zend_register_internal_class_ex(&ce, NULL, NULL);
+	gdk_drag_context_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
 	php_gtk_register_prop_getter(gdk_drag_context_ce, gdk_drag_context_get_property);
 
 	INIT_OVERLOADED_CLASS_ENTRY(ce, "gtkselectiondata", php_gtk_selection_data_functions, NULL, php_gtk_get_property, php_gtk_set_property);
-	gtk_selection_data_ce = zend_register_internal_class_ex(&ce, NULL, NULL);
+	gtk_selection_data_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
 	php_gtk_register_prop_getter(gtk_selection_data_ce, gtk_selection_data_get_property);
 
 	INIT_OVERLOADED_CLASS_ENTRY(ce, "gtkctreenode", php_gtk_ctree_node_functions, NULL, php_gtk_get_property, php_gtk_set_property);
-	gtk_ctree_node_ce = zend_register_internal_class_ex(&ce, NULL, NULL);
+	gtk_ctree_node_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
 	php_gtk_register_prop_getter(gtk_ctree_node_ce, gtk_ctree_node_get_property);
 
 	INIT_CLASS_ENTRY(ce, "gtkaccelgroup", php_gtk_accel_group_functions);
-	gtk_accel_group_ce = zend_register_internal_class_ex(&ce, NULL, NULL);
+	gtk_accel_group_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
 
 	INIT_OVERLOADED_CLASS_ENTRY(ce, "gtkstyle", php_gtk_style_functions, NULL, php_gtk_get_property, php_gtk_set_property);
-	gtk_style_ce = zend_register_internal_class_ex(&ce, NULL, NULL);
+	gtk_style_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
 	php_gtk_register_prop_getter(gtk_style_ce, gtk_style_get_property);
 	php_gtk_register_prop_setter(gtk_style_ce, gtk_style_set_property);
 
 	INIT_OVERLOADED_CLASS_ENTRY(ce, "gtkboxchild", NULL, NULL, php_gtk_get_property, php_gtk_set_property);
-	gtk_box_child_ce = zend_register_internal_class_ex(&ce, NULL, NULL);
+	gtk_box_child_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
 	php_gtk_register_prop_getter(gtk_box_child_ce, gtk_box_child_get_property);
 
 	INIT_OVERLOADED_CLASS_ENTRY(ce, "gtkfixedchild", NULL, NULL, php_gtk_get_property, php_gtk_set_property);
-	gtk_fixed_child_ce = zend_register_internal_class_ex(&ce, NULL, NULL);
+	gtk_fixed_child_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
 	php_gtk_register_prop_getter(gtk_fixed_child_ce, gtk_fixed_child_get_property);
 
 	INIT_OVERLOADED_CLASS_ENTRY(ce, "gtkclistrow", NULL, NULL, php_gtk_get_property, php_gtk_set_property);
-	gtk_clist_row_ce = zend_register_internal_class_ex(&ce, NULL, NULL);
+	gtk_clist_row_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
 	php_gtk_register_prop_getter(gtk_clist_row_ce, gtk_clist_row_get_property);
 
 	INIT_CLASS_ENTRY(ce, "gtkallocation", NULL);
-	gtk_allocation_ce = zend_register_internal_class_ex(&ce, &zend_standard_class_def, NULL);
+	gtk_allocation_ce = zend_register_internal_class_ex(&ce, &zend_standard_class_def, NULL TSRMLS_CC);
 }
 
 #endif
Index: php-gtk/ext/gtk+/php_gtk+.h
diff -u php-gtk/ext/gtk+/php_gtk+.h:1.6 php-gtk/ext/gtk+/php_gtk+.h:1.7
--- php-gtk/ext/gtk+/php_gtk+.h:1.6	Mon Jul 30 15:13:13 2001
+++ php-gtk/ext/gtk+/php_gtk+.h	Mon Jul 30 20:37:00 2001
@@ -18,7 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
  
-/* $Id: php_gtk+.h,v 1.6 2001/07/30 19:13:13 andrei Exp $: */
+/* $Id: php_gtk+.h,v 1.7 2001/07/31 00:37:00 fmk Exp $: */
 
 #ifndef _PHP_GTK_PLUS_H
 #define _PHP_GTK_PLUS_H
@@ -42,6 +42,14 @@
 extern int le_gdk_drag_context;
 extern int le_gtk_accel_group;
 extern int le_gtk_style;
+
+inline GdkAtom php_gdk_atom_get(zval *wrapper)
+{
+	zval **atom;
+	
+	zend_hash_find(Z_OBJPROP_P(wrapper), "atom", sizeof("atom"), (void**)&atom);
+	return (GdkAtom)Z_LVAL_PP(atom);
+}
 
 #define PHP_GTK_GET(w)				PHP_GTK_GET_GENERIC(w, GtkObject*, le_gtk_object)
 #define PHP_GDK_EVENT_GET(w)		PHP_GTK_GET_GENERIC(w, GdkEvent*, le_php_gtk_wrapper)
Index: php-gtk/ext/gtk+/gtk.overrides
diff -u php-gtk/ext/gtk+/gtk.overrides:1.6 php-gtk/ext/gtk+/gtk.overrides:1.7
--- php-gtk/ext/gtk+/gtk.overrides:1.6	Mon Jul 30 15:13:13 2001
+++ php-gtk/ext/gtk+/gtk.overrides	Mon Jul 30 20:37:00 2001
@@ -189,7 +189,7 @@
 
 	if (ZEND_NUM_ARGS() < 2) {
 		php_error(E_WARNING, "%s() requires at least 2 arguments, %d given",
-				  get_active_function_name(), ZEND_NUM_ARGS());
+				  get_active_function_name(TSRMLS_C), ZEND_NUM_ARGS());
 		return;
 	}
 
@@ -216,7 +216,7 @@
 
 	if (ZEND_NUM_ARGS() < 1) {
 		php_error(E_WARNING, "%s() requires at least 1 argument, %d given",
-				  get_active_function_name(), ZEND_NUM_ARGS());
+				  get_active_function_name(TSRMLS_C), ZEND_NUM_ARGS());
 		return;
 	}
 
@@ -244,7 +244,7 @@
 
 	if (ZEND_NUM_ARGS() < 2) {
 		php_error(E_WARNING, "%s() requires at least 2 arguments, %d given",
-				  get_active_function_name(), ZEND_NUM_ARGS());
+				  get_active_function_name(TSRMLS_C), ZEND_NUM_ARGS());
 		return;
 	}
 
@@ -274,7 +274,7 @@
 
 	if (ZEND_NUM_ARGS() < 3) {
 		php_error(E_WARNING, "%s() requires at least 3 arguments, %d given",
-				  get_active_function_name(), ZEND_NUM_ARGS());
+				  get_active_function_name(TSRMLS_C), ZEND_NUM_ARGS());
 		return;
 	}
 
@@ -283,7 +283,7 @@
 
 	source = zend_list_find(Z_LVAL_P(source_rsrc), &rsrc_type);
 	if (!source || rsrc_type != php_file_le_fopen()) {
-		php_error(E_WARNING, "%s() expects argument 1 to be a valid filehandle resource", get_active_function_name());
+		php_error(E_WARNING, "%s() expects argument 1 to be a valid filehandle resource", get_active_function_name(TSRMLS_C));
 		return;
 	}
 	
@@ -310,7 +310,7 @@
 
 	if (ZEND_NUM_ARGS() < 2) {
 		php_error(E_WARNING, "%s() requires at least 2 arguments, %d given",
-				  get_active_function_name(), ZEND_NUM_ARGS());
+				  get_active_function_name(TSRMLS_C), ZEND_NUM_ARGS());
 		return;
 	}
 
@@ -362,7 +362,7 @@
 	NOT_STATIC_METHOD();
 
 	if (ZEND_NUM_ARGS() < 1) {
-		php_error(E_WARNING, "%s() requires at least 1 argument, 0 given", get_active_function_name());
+		php_error(E_WARNING, "%s() requires at least 1 argument, 0 given", get_active_function_name(TSRMLS_C));
 		return;
 	}
 
@@ -372,14 +372,14 @@
 	signal_id = gtk_signal_lookup(name, GTK_OBJECT_TYPE(PHP_GTK_GET(this_ptr)));
 	if (signal_id <= 0) {
 		php_error(E_WARNING, "%s() can't find signal '%s' in class hierarchy",
-				  get_active_function_name(), name);
+				  get_active_function_name(TSRMLS_C), name);
 		return;
 	}
 
 	query = gtk_signal_query(signal_id);
 	if (ZEND_NUM_ARGS() < (int)query->nparams + 1) {
 		php_error(E_WARNING, "%s() requires %d arguments for signal '%s', %d given",
-				  get_active_function_name(), query->nparams, name, ZEND_NUM_ARGS()-1);
+				  get_active_function_name(TSRMLS_C), query->nparams, name, ZEND_NUM_ARGS()-1);
 		g_free(query);
 		return;
 	}
@@ -453,7 +453,7 @@
 
 	if (garg.type == GTK_TYPE_INVALID) {
 		php_error(E_WARNING, "%s(): invalid arg '%s'",
-				  get_active_function_name(), name);
+				  get_active_function_name(TSRMLS_C), name);
 		return;
 	}
 	
@@ -630,13 +630,13 @@
 	}
 
 	if (columns <= 0) {
-		php_error(E_WARNING, "%s() needs number of columns to be > 0", get_active_function_name());
+		php_error(E_WARNING, "%s() needs number of columns to be > 0", get_active_function_name(TSRMLS_C));
 		return;
 	}
 
 	if (php_titles) {
 		if (zend_hash_num_elements(Z_ARRVAL_P(php_titles)) < columns) {
-			php_error(E_WARNING, "%s(): the array of titles is not long enough", get_active_function_name());
+			php_error(E_WARNING, "%s(): the array of titles is not long enough", get_active_function_name(TSRMLS_C));
 			return;
 		}
 
@@ -655,7 +655,7 @@
 		wrapped_obj = (GtkObject *)gtk_clist_new(columns);
 
 	if (!wrapped_obj) {
-		php_error(E_WARNING, "%s(): could not create GtkCList object", get_active_function_name());
+		php_error(E_WARNING, "%s(): could not create GtkCList object", get_active_function_name(TSRMLS_C));
 		php_gtk_invalidate(this_ptr);
 		return;
 	}
@@ -680,7 +680,7 @@
 
 	columns = GTK_CLIST(PHP_GTK_GET(this_ptr))->columns;
 	if (zend_hash_num_elements(Z_ARRVAL_P(php_list)) < columns) {
-		php_error(E_WARNING, "%s(): the array of strings is not long enough", get_active_function_name());
+		php_error(E_WARNING, "%s(): the array of strings is not long enough", get_active_function_name(TSRMLS_C));
 		return;
 	}
 	
@@ -714,7 +714,7 @@
 
 	columns = GTK_CLIST(PHP_GTK_GET(this_ptr))->columns;
 	if (zend_hash_num_elements(Z_ARRVAL_P(php_list)) < columns) {
-		php_error(E_WARNING, "%s(): the array of strings is not long enough", get_active_function_name());
+		php_error(E_WARNING, "%s(): the array of strings is not long enough", get_active_function_name(TSRMLS_C));
 		return;
 	}
 
@@ -748,7 +748,7 @@
 
 	columns = GTK_CLIST(PHP_GTK_GET(this_ptr))->columns;
 	if (zend_hash_num_elements(Z_ARRVAL_P(php_list)) < columns) {
-		php_error(E_WARNING, "%s(): the array of strings is not long enough", get_active_function_name());
+		php_error(E_WARNING, "%s(): the array of strings is not long enough", get_active_function_name(TSRMLS_C));
 		return;
 	}
 
@@ -775,7 +775,7 @@
 		return;
 
 	if (!gtk_clist_get_text(GTK_CLIST(PHP_GTK_GET(this_ptr)), row, column, &text)) {
-		php_error(E_WARNING, "%s() cannot get text value", get_active_function_name());
+		php_error(E_WARNING, "%s() cannot get text value", get_active_function_name(TSRMLS_C));
 		return;
 	}
 
@@ -804,7 +804,7 @@
 
 	if (!wrapped_obj) {
 		php_error(E_WARNING, "%s(): could not create GtkMenuItem object",
-				  get_active_function_name());
+				  get_active_function_name(TSRMLS_C));
 		php_gtk_invalidate(this_ptr);
 		return;
 	}
@@ -835,7 +835,7 @@
 
 	if (!wrapped_obj) {
 		php_error(E_WARNING, "%s(): could not create GtkCheckMenuItem object",
-				  get_active_function_name());
+				  get_active_function_name(TSRMLS_C));
 		php_gtk_invalidate(this_ptr);
 		return;
 	}
@@ -859,7 +859,7 @@
 		 zend_hash_get_current_data(Z_ARRVAL_P(php_items), (void **)&item) == SUCCESS;
 		 zend_hash_move_forward(Z_ARRVAL_P(php_items)), i++) {
 		if (!php_gtk_check_class(*item, gtk_listitem_ce)) {
-			php_error(E_WARNING, "%s() needs list item #%d to be a GtkListItem", get_active_function_name(), i);
+			php_error(E_WARNING, "%s() needs list item #%d to be a GtkListItem", get_active_function_name(TSRMLS_C), i);
 			g_list_free(items);
 			return;
 		}
@@ -886,7 +886,7 @@
 		 zend_hash_get_current_data(Z_ARRVAL_P(php_items), (void **)&item) == SUCCESS;
 		 zend_hash_move_forward(Z_ARRVAL_P(php_items)), i++) {
 		if (!php_gtk_check_class(*item, gtk_listitem_ce)) {
-			php_error(E_WARNING, "%s() needs list item #%d to be a GtkListItem", get_active_function_name(), i);
+			php_error(E_WARNING, "%s() needs list item #%d to be a GtkListItem", get_active_function_name(TSRMLS_C), i);
 			g_list_free(items);
 			return;
 		}
@@ -913,7 +913,7 @@
 		 zend_hash_get_current_data(Z_ARRVAL_P(php_items), (void **)&item) == SUCCESS;
 		 zend_hash_move_forward(Z_ARRVAL_P(php_items)), i++) {
 		if (!php_gtk_check_class(*item, gtk_listitem_ce)) {
-			php_error(E_WARNING, "%s() needs list item #%d to be a GtkListItem", get_active_function_name(), i);
+			php_error(E_WARNING, "%s() needs list item #%d to be a GtkListItem", get_active_function_name(TSRMLS_C), i);
 			g_list_free(items);
 			return;
 		}
@@ -946,7 +946,7 @@
 
 	if (!wrapped_obj) {
 		php_error(E_WARNING, "%s(): could not create GtkListItem object",
-				get_active_function_name());
+				get_active_function_name(TSRMLS_C));
 		php_gtk_invalidate(this_ptr);
 		return;
 	}
@@ -976,7 +976,7 @@
 
 	if (!wrapped_obj) {
 		php_error(E_WARNING, "%s(): could not create GtkTreeItem object",
-				get_active_function_name());
+				get_active_function_name(TSRMLS_C));
 		php_gtk_invalidate(this_ptr);
 		return;
 	}
@@ -1006,7 +1006,7 @@
 
 	if (!wrapped_obj) {
 		php_error(E_WARNING, "%s(): could not create GtkButton object",
-				  get_active_function_name());
+				  get_active_function_name(TSRMLS_C));
 		php_gtk_invalidate(this_ptr);
 		return;
 	}
@@ -1036,7 +1036,7 @@
 
 	if (!wrapped_obj) {
 		php_error(E_WARNING, "%s(): could not create GtkToggleButton object",
-				  get_active_function_name());
+				  get_active_function_name(TSRMLS_C));
 		php_gtk_invalidate(this_ptr);
 		return;
 	}
@@ -1064,7 +1064,7 @@
 		wrapped_obj = (GtkObject *)gtk_check_button_new();
 	if (!wrapped_obj) {
 		php_error(E_WARNING, "%s(): could not create GtkCheckButton object",
-				  get_active_function_name());
+				  get_active_function_name(TSRMLS_C));
 		php_gtk_invalidate(this_ptr);
 		return;
 	}
@@ -1096,13 +1096,13 @@
 	}
 
 	if (columns <= 0) {
-		php_error(E_WARNING, "%s() needs number of columns to be > 0", get_active_function_name());
+		php_error(E_WARNING, "%s() needs number of columns to be > 0", get_active_function_name(TSRMLS_C));
 		return;
 	}
 
 	if (php_titles) {
 		if (zend_hash_num_elements(Z_ARRVAL_P(php_titles)) < columns) {
-			php_error(E_WARNING, "%s(): the array of titles is not long enough", get_active_function_name());
+			php_error(E_WARNING, "%s(): the array of titles is not long enough", get_active_function_name(TSRMLS_C));
 			return;
 		}
 
@@ -1121,7 +1121,7 @@
 		wrapped_obj = (GtkObject *)gtk_ctree_new(columns, tree_column);
 
 	if (!wrapped_obj) {
-		php_error(E_WARNING, "%s(): could not create GtkCTree object", get_active_function_name());
+		php_error(E_WARNING, "%s(): could not create GtkCTree object", get_active_function_name(TSRMLS_C));
 		php_gtk_invalidate(this_ptr);
 		return;
 	}
@@ -1159,7 +1159,7 @@
 	tree = GTK_CTREE(PHP_GTK_GET(this_ptr));
 	columns = GTK_CLIST(tree)->columns;
 	if (zend_hash_num_elements(target_hash) < columns) {
-		php_error(E_WARNING, "%s(): the text array is not long enough", get_active_function_name());
+		php_error(E_WARNING, "%s(): the text array is not long enough", get_active_function_name(TSRMLS_C));
 		return;
 	}
 
@@ -1222,7 +1222,7 @@
 
 	args = php_gtk_hash_as_array(params);
 
-	call_user_function_ex(EG(function_table), NULL, *callback, &retval, zend_hash_num_elements(Z_ARRVAL_P(params)), args, 1, NULL);
+	call_user_function_ex(EG(function_table), NULL, *callback, &retval, zend_hash_num_elements(Z_ARRVAL_P(params)), args, 1, NULL TSRMLS_CC);
 	if (retval)
 		zval_ptr_dtor(&retval);
 	efree(args);
@@ -1246,7 +1246,7 @@
 
 	if (ZEND_NUM_ARGS() < req_args) {
 		php_error(E_WARNING, "%s() requires at least %d arguments, %d given",
-				  get_active_function_name(), req_args, ZEND_NUM_ARGS());
+				  get_active_function_name(TSRMLS_C), req_args, ZEND_NUM_ARGS());
 		return;
 	}
 
@@ -1328,7 +1328,7 @@
 								 PHP_GTK_CTREE_NODE_GET(node), &text, &spacing,
 								 &pixmap_closed, &mask_closed, &pixmap_opened,
 								 &mask_opened, &is_leaf, &expanded)) {
-		php_error(E_WARNING, "%s() cannot get node info", get_active_function_name());
+		php_error(E_WARNING, "%s() cannot get node info", get_active_function_name(TSRMLS_C));
 		return;
 	}
 
@@ -1388,7 +1388,7 @@
 
 	args = php_gtk_hash_as_array(params);
 
-	call_user_function_ex(EG(function_table), NULL, *callback, &retval, zend_hash_num_elements(Z_ARRVAL_P(params)), args, 1, NULL);
+	call_user_function_ex(EG(function_table), NULL, *callback, &retval, zend_hash_num_elements(Z_ARRVAL_P(params)), args, 1, NULL TSRMLS_CC);
 	if (retval)
 		zval_ptr_dtor(&retval);
 	efree(args);
@@ -1418,7 +1418,7 @@
 									 &entry.accelerator, &callback,
 									 &entry.callback_action, &entry.item_type, &extra)) {
 			php_error(E_WARNING, "%s() was unable to parse item #%d in the input array",
-					  get_active_function_name(), i+1);
+					  get_active_function_name(TSRMLS_C), i+1);
 			return;
 		}
 
@@ -1677,7 +1677,7 @@
 
 	if (!wrapped_obj) {
 		php_error(E_WARNING, "%s(): could not create GtkRadioMenuItem object",
-				  get_active_function_name());
+				  get_active_function_name(TSRMLS_C));
 		php_gtk_invalidate(this_ptr);
 		return;
 	}
@@ -1717,7 +1717,7 @@
 
 	if (!wrapped_obj) {
 		php_error(E_WARNING, "%s(): could not create GtkRadioButton object",
-				  get_active_function_name());
+				  get_active_function_name(TSRMLS_C));
 		php_gtk_invalidate(this_ptr);
 		return;
 	}
@@ -1868,7 +1868,7 @@
 
 	if (!gtk_ctree_node_get_text(GTK_CTREE(PHP_GTK_GET(this_ptr)),
 								 PHP_GTK_CTREE_NODE_GET(node), column, &text)) {
-		php_error(E_WARNING, "%s() cannot get text value", get_active_function_name());
+		php_error(E_WARNING, "%s() cannot get text value", get_active_function_name(TSRMLS_C));
 		return;
 	}
 
@@ -1891,7 +1891,7 @@
 	if (!gtk_ctree_node_get_pixmap(GTK_CTREE(PHP_GTK_GET(this_ptr)),
 								   PHP_GTK_CTREE_NODE_GET(node), column,
 								   &pixmap, &mask)) {
-		php_error(E_WARNING, "%s() cannot get pixmap value", get_active_function_name());
+		php_error(E_WARNING, "%s() cannot get pixmap value", get_active_function_name(TSRMLS_C));
 		return;
 	}
 	
@@ -1919,7 +1919,7 @@
 	if (!gtk_ctree_node_get_pixtext(GTK_CTREE(PHP_GTK_GET(this_ptr)),
 									PHP_GTK_CTREE_NODE_GET(node), column, &text,
 									&spacing, &pixmap, &mask)) {
-		php_error(E_WARNING, "%s() cannot get pixtext value", get_active_function_name());
+		php_error(E_WARNING, "%s() cannot get pixtext value", get_active_function_name(TSRMLS_C));
 		return;
 	}
 
@@ -1963,7 +1963,7 @@
 	params = php_gtk_build_value("(Nii)", php_gtk_new(GTK_OBJECT(menu)), *x, *y);
 	args = php_gtk_hash_as_array(params);
 
-	call_user_function_ex(EG(function_table), NULL, *callback, &retval, zend_hash_num_elements(Z_ARRVAL_P(params)), args, 1, NULL);
+	call_user_function_ex(EG(function_table), NULL, *callback, &retval, zend_hash_num_elements(Z_ARRVAL_P(params)), args, 1, NULL TSRMLS_CC);
 
 	if (retval) {
 		if (Z_TYPE_P(retval) == IS_ARRAY &&
@@ -2063,7 +2063,7 @@
 		if (Z_TYPE_PP(item) != IS_ARRAY ||
 			!php_gtk_parse_args_hash_quiet(*item, "sii", &targets[i].target,
 										   &targets[i].flags, &targets[i].info)) {
-			php_error(E_WARNING, "%s() was unable to parse target #%d in the list of targets", get_active_function_name(), i+1);
+			php_error(E_WARNING, "%s() was unable to parse target #%d in the list of targets", get_active_function_name(TSRMLS_C), i+1);
 			g_free(targets);
 			return;
 		}
@@ -2103,7 +2103,7 @@
 		if (Z_TYPE_PP(item) != IS_ARRAY ||
 			!php_gtk_parse_args_hash_quiet(*item, "sii", &targets[i].target,
 										   &targets[i].flags, &targets[i].info)) {
-			php_error(E_WARNING, "%s() was unable to parse target #%d in the list of targets", get_active_function_name(), i+1);
+			php_error(E_WARNING, "%s() was unable to parse target #%d in the list of targets", get_active_function_name(TSRMLS_C), i+1);
 			g_free(targets);
 			return;
 		}
@@ -2141,7 +2141,7 @@
 		if (Z_TYPE_PP(item) != IS_ARRAY ||
 			!php_gtk_parse_args_hash_quiet(*item, "sii", &tents[i].target,
 										   &tents[i].flags, &tents[i].info)) {
-			php_error(E_WARNING, "%s() was unable to parse target #%d in the list of targets", get_active_function_name(), i+1);
+			php_error(E_WARNING, "%s() was unable to parse target #%d in the list of targets", get_active_function_name(TSRMLS_C), i+1);
 			g_free(tents);
 			return;
 		}
Index: php-gtk/ext/gtk+/gdk.overrides
diff -u php-gtk/ext/gtk+/gdk.overrides:1.3 php-gtk/ext/gtk+/gdk.overrides:1.4
--- php-gtk/ext/gtk+/gdk.overrides:1.3	Thu Jul 19 01:24:16 2001
+++ php-gtk/ext/gtk+/gdk.overrides	Mon Jul 30 20:37:00 2001
@@ -20,7 +20,7 @@
 	if (gdk_color_parse(color_spec, &color))
 		*return_value = *php_gdk_color_new(&color);
 	else
-		php_error(E_WARNING, "%s() could not parse color spec '%s'", get_active_function_name(), color_spec);
+		php_error(E_WARNING, "%s() could not parse color spec '%s'", get_active_function_name(TSRMLS_C), color_spec);
 }
 %%
 override gdk_pixmap_create_from_xpm
@@ -44,7 +44,7 @@
 
 	pixmap = gdk_pixmap_create_from_xpm(window, &mask, trans_color, filename);
 	if (!pixmap) {
-		php_error(E_WARNING, "%s() cannot load pixmap", get_active_function_name());
+		php_error(E_WARNING, "%s() cannot load pixmap", get_active_function_name(TSRMLS_C));
 		return;
 	}
 	
@@ -86,7 +86,7 @@
 	pixmap = gdk_pixmap_create_from_xpm_d(window, &mask, trans_color, data);
 	efree(data);
 	if (!pixmap) {
-		php_error(E_WARNING, "%s() cannot create pixmap", get_active_function_name());
+		php_error(E_WARNING, "%s() cannot create pixmap", get_active_function_name(TSRMLS_C));
 		return;
 	}
 
@@ -120,7 +120,7 @@
 
 	pixmap = gdk_pixmap_colormap_create_from_xpm(window, colormap, &mask, trans_color, filename);
 	if (!pixmap) {
-		php_error(E_WARNING, "%s() cannot load pixmap", get_active_function_name());
+		php_error(E_WARNING, "%s() cannot load pixmap", get_active_function_name(TSRMLS_C));
 		return;
 	}
 
@@ -167,7 +167,7 @@
 	pixmap = gdk_pixmap_colormap_create_from_xpm_d(window, colormap, &mask, trans_color, data);
 	efree(data);
 	if (!pixmap) {
-		php_error(E_WARNING, "%s() cannot create pixmap", get_active_function_name());
+		php_error(E_WARNING, "%s() cannot create pixmap", get_active_function_name(TSRMLS_C));
 		return;
 	}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.