com php/gtk-src: More tsrmls_fetch removal: ext/gtk+/ph p_gtk+_types.c ext/spell/php_spell.c main/phpg_ gobject.c
[email protected] (Elizabeth Marie Smith) Wed, 18 Jul 2012 19:19:05 +0000
| Newsgroups | php.gtk.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: 68a733751e399aee4e4d0056c52b17f72cc2e4a5=0AAuthor: Elizabeth = M Smith <[email protected]> Wed, 18 Jul 2012 15:19:05 -0400= =0AParents: 598e23dcaf0669d68d497d7216eefd1bd5963e78=0ABranches: master= =0A=0ALink: http://git.php.net/?p=3Dphp/gtk-src.git;a=3Dcommitdiff;h= =3D68a733751e399aee4e4d0056c52b17f72cc2e4a5=0A=0ALog:=0AMore tsrmls_fetch r= emoval=0A=0AChanged paths:=0A M ext/gtk+/php_gtk+_types.c=0A M ext/spel= l/php_spell.c=0A M main/phpg_gobject.c=0A=0A=0ADiff:=0Adiff --git a/ext/g= tk+/php_gtk+_types.c b/ext/gtk+/php_gtk+_types.c=0Aindex 8711947..d1ac6f5 1= 00644=0A--- a/ext/gtk+/php_gtk+_types.c=0A+++ b/ext/gtk+/php_gtk+_types.c= =0A@@ -1334,11 +1334,10 @@ static function_entry php_gdk_event_functions[] = =3D {=0A =09{NULL, NULL, NULL}=0A };=0A =0A-zval *php_gdk_event_new(GdkEven= t *event)=0A+zval *php_gdk_event_new(GdkEvent *event TSRMLS_DC)=0A {=0A =09= zval *result;=0A =09zval *value;=0A-=09TSRMLS_FETCH();=0A =0A =09MAKE_STD_Z= VAL(result);=0A =0Adiff --git a/ext/spell/php_spell.c b/ext/spell/php_spell= .c=0Aindex 1f6bed0..56f0321 100644=0A--- a/ext/spell/php_spell.c=0A+++ b/ex= t/spell/php_spell.c=0A@@ -91,18 +91,14 @@ static function_entry gtkspell_me= thods[] =3D {=0A =09{ NULL, NULL, NULL }=0A };=0A =0A-void phpg_gtkspell_re= gister_classes(void)=0A+void phpg_gtkspell_register_classes(TSRMLS_D)=0A {= =0A-=09TSRMLS_FETCH();=0A =0A =09gtkspell_ce =3D phpg_register_class("GtkSp= ell", gtkspell_methods, gobject_ce, 0, NULL, NULL, 0 TSRMLS_CC);=0A }=0A = =0A void phpg_gtkspell_register_constants(const char *strip_prefix)=0A {=0A= - TSRMLS_FETCH();=0A-=0A-=0A /* register gtype constants for all cla= sses */=0A =0A =09phpg_register_int_constant(gtkspell_ce, "gtype", sizeof("= gtype")-1, 0);=0A@@ -118,7 +114,7 @@ PHP_GTK_GET_EXTENSION(spell)=0A =0A PH= P_GTK_XINIT_FUNCTION(spell)=0A {=0A-=09phpg_gtkspell_register_classes();=0A= +=09phpg_gtkspell_register_classes(TSRMLS_C);=0A phpg_gtkspell_register= _constants("SPELL_");=0A =0A =09return SUCCESS;=0Adiff --git a/main/phpg_go= bject.c b/main/phpg_gobject.c=0Aindex 3ed2be1..b1ce5b3 100644=0A--- a/main/= phpg_gobject.c=0A+++ b/main/phpg_gobject.c=0A@@ -30,6 +30,7 @@=0A static GQ= uark gobject_wrapper_handle_key =3D 0;=0A static GQuark gobject_wrapper_= handlers_key =3D 0;=0A static GQuark gobject_wrapper_owned_key =3D 0;= =0A+static GQuark gobject_wrapper_zts_key =3D 0;=0A =0A PHP_GTK_API zen= d_object_handlers phpg_gobject_handlers;=0A =0A@@ -165,6 +166,9 @@ PHP_GTK_= API void phpg_gobject_set_wrapper(zval *zobj, GObject *obj TSRMLS_DC)=0A = pobj->is_owned =3D FALSE;=0A g_object_set_qdata(pobj->obj, gobject_wr= apper_handle_key, (void*)Z_OBJ_HANDLE_P(zobj));=0A g_object_set_qdata(p= obj->obj, gobject_wrapper_handlers_key, (void*)Z_OBJ_HT_P(zobj));=0A+#ifdef= ZTS=0A+ g_object_set_qdata(pobj->obj, gobject_wrapper_zts_key, (void*)T= SRMLS_C);=0A+#endif=0A }=0A /* }}} */=0A =0A@@ -221,6 +225,9 @@ PHP_GTK_API= void phpg_gobject_new(zval **zobj, GObject *obj TSRMLS_DC)=0A pobj= ->is_owned =3D FALSE;=0A g_object_set_qdata(obj, gobject_wrapper_ha= ndle_key, (void*)Z_OBJ_HANDLE_PP(zobj));=0A g_object_set_qdata(obj,= gobject_wrapper_handlers_key, (void*)Z_OBJ_HT_PP(zobj));=0A+#ifdef ZTS=0A+= g_object_set_qdata(obj, gobject_wrapper_zts_key, (void*)TSRMLS_C);= =0A+#endif=0A }=0A }=0A /* }}} */=0A@@ -936,7 +943,10 @@ static void ph= pg_object_get_property(GObject *object, guint property_id, GValue=0A zv= al *php_pspec =3D NULL;=0A zval *retval =3D NULL;=0A =0A-=09TSRMLS_FETC= H();=0A+#ifdef ZTS=0A+ TSRMLS_D =3D g_object_get_qdata(object, gobject_w= rapper_zts_key);=0A+#endif=0A+=0A phpg_gobject_new(&php_object, object = TSRMLS_CC);=0A phpg_paramspec_new(&php_pspec, pspec TSRMLS_CC);=0A =0A@= @ -962,7 +972,10 @@ static void phpg_object_set_property(GObject *object, g= uint property_id, const G=0A zval *php_value =3D NULL;=0A zval *ret= val =3D NULL;=0A =0A-=09TSRMLS_FETCH();=0A+#ifdef ZTS=0A+ TSRMLS_D =3D g= _object_get_qdata(object, gobject_wrapper_zts_key);=0A+#endif=0A+ =0A = if (phpg_gvalue_to_zval(value, &php_value, TRUE, TRUE TSRMLS_CC) =3D=3D F= AILURE) {=0A php_error(E_WARNING, "phpg_object_set_property: could = not convert GValue to PHP value");=0A zval_ptr_dtor(&php_value);=0A= @@ -988,10 +1001,9 @@ static void phpg_object_class_init(GObjectClass *clas= s, zend_class_entry *ce)=0A class->set_property =3D phpg_object_set_pro= perty;=0A }=0A =0A-static GParamSpec* phpg_create_property(const char *prop= _name, GType prop_type, const char *nick, const char *blurb, zval *type_arg= s, GParamFlags flags)=0A+static GParamSpec* phpg_create_property(const char= *prop_name, GType prop_type, const char *nick, const char *blurb, zval *ty= pe_args, GParamFlags flags TSRMLS_DC)=0A {=0A GParamSpec *pspec =3D NUL= L;=0A-=09TSRMLS_FETCH();=0A =0A switch (G_TYPE_FUNDAMENTAL(prop_type)) = {=0A case G_TYPE_CHAR:=0A@@ -1152,7 +1164,7 @@ static GParamSpec* p= hpg_create_property(const char *prop_name, GType prop_type,=0A return p= spec;=0A }=0A =0A-static int phpg_register_properties(GType type, zval *pro= perties)=0A+static int phpg_register_properties(GType type, zval *propertie= s TSRMLS_DC)=0A {=0A GObjectClass *oclass;=0A GParamFlags flags;=0A= @@ -1168,8 +1180,6 @@ static int phpg_register_properties(GType type, zval = *properties)=0A zval *type_args =3D NULL;=0A zval *php_prop_type;= =0A =0A-=09TSRMLS_FETCH();=0A-=0A oclass =3D g_type_class_ref(type);=0A= if (!oclass) {=0A php_error_docref(NULL TSRMLS_CC, E_WARNING, = "couuld not get a reference to type class");=0A@@ -1217,7 +1227,7 @@ static= int phpg_register_properties(GType type, zval *properties)=0A = break;=0A }=0A =0A- pspec =3D phpg_create_property(s= tr_key, prop_type, nick, blurb, type_args, flags);=0A+ pspec =3D php= g_create_property(str_key, prop_type, nick, blurb, type_args, flags TSRMLS_= CC);=0A if (pspec) {=0A g_object_class_install_property= (oclass, 1, pspec);=0A } else {=0A@@ -1434,7 +1444,7 @@ static PHP_= METHOD(GObject, register_type)=0A =09=09=09}=0A =09=09=09return;=0A =09=09}= =0A-=09=09if (phpg_register_properties(new_type, *prop_decls) =3D=3D FAILUR= E) {=0A+=09=09if (phpg_register_properties(new_type, *prop_decls TSRMLS_CC)= =3D=3D FAILURE) {=0A =09=09=09if (free_name) {=0A =09=09=09=09g_free(type_= name);=0A =09=09=09}=0A@@ -1475,7 +1485,7 @@ static PHP_METHOD(GObject, reg= ister_type)=0A =09=09=09=09}=0A =09=09=09=09return;=0A =09=09=09}=0A-=09=09= =09if (phpg_register_properties(new_type, property) =3D=3D FAILURE) {=0A+= =09=09=09if (phpg_register_properties(new_type, property TSRMLS_CC) =3D=3D = FAILURE) {=0A =09=09=09=09if (free_name) {=0A =09=09=09=09=09g_free(type_na= me);=0A =09=09=09=09}=0A@@ -1717,6 +1727,9 @@ void phpg_gobject_register_se= lf(TSRMLS_D)=0A gobject_wrapper_handle_key =3D g_quark_from_static_st= ring("phpg-wrapper-handle");=0A gobject_wrapper_handlers_key =3D g_quar= k_from_static_string("phpg-wrapper-handlers");=0A gobject_wrapper_owned= _key =3D g_quark_from_static_string("phpg-wrapper-owned");=0A+#ifdef ZTS= =0A+ gobject_wrapper_zts_key =3D g_quark_from_static_string("phpg-wra= pper-zts");=0A+#endif=0A =0A phpg_gobject_handlers =3D php_gtk_handlers= ;=0A phpg_gobject_handlers.del_ref =3D phpg_gobject_del_ref;=0A