pajoye                                   Thu, 16 Sep 2010 09:13:19 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=303414

Log:
- use TSRMLS_*C instead of TSRMLS_FETCH in zend_list_insert

Changed paths:
    U   php/php-src/trunk/UPGRADING.INTERNALS
    U   php/php-src/trunk/Zend/zend_list.c
    U   php/php-src/trunk/Zend/zend_list.h
    U   php/php-src/trunk/ext/com_dotnet/com_persist.c
    U   php/php-src/trunk/ext/com_dotnet/com_wrapper.c
    U   php/php-src/trunk/ext/interbase/ibase_query.c
    U   php/php-src/trunk/ext/libxml/libxml.c
    U   php/php-src/trunk/ext/mssql/php_mssql.c
    U   php/php-src/trunk/ext/oci8/oci8.c
    U   php/php-src/trunk/ext/odbc/birdstep.c
    U   php/php-src/trunk/ext/openssl/openssl.c
    U   php/php-src/trunk/ext/openssl/xp_ssl.c
    U   php/php-src/trunk/ext/pgsql/pgsql.c
    U   php/php-src/trunk/ext/pspell/pspell.c
    U   php/php-src/trunk/ext/shmop/shmop.c
    U   php/php-src/trunk/ext/soap/php_http.c
    U   php/php-src/trunk/ext/soap/soap.c
    U   php/php-src/trunk/ext/standard/file.c
    U   php/php-src/trunk/ext/standard/file.h
    U   php/php-src/trunk/ext/standard/streamsfuncs.c
    U   php/php-src/trunk/ext/sysvmsg/sysvmsg.c
    U   php/php-src/trunk/main/streams/php_stream_context.h
    U   php/php-src/trunk/main/streams/streams.c

Modified: php/php-src/trunk/UPGRADING.INTERNALS
===================================================================
--- php/php-src/trunk/UPGRADING.INTERNALS	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/UPGRADING.INTERNALS	2010-09-16 09:13:19 UTC (rev 303414)
@@ -66,4 +66,23 @@

 Use emalloc, emalloc_rel, efree or efree_rel instead.

+	f. zend_list_insert
+zend_list_insert uses now TSRMLS_DC:

+ZEND_API int zend_list_insert(void *ptr, int type TSRMLS_DC);
+
+it has to be called using:
+
+zend_list_insert(a, SOMETYPE TSRMLS_CC);
+
+If zend_list_insert is used to register a resource, ZEND_REGISTER_RESOURCE
+could be used instead.
+
+	g. php_le_stream_context(TSRMLS_C)
+php_le_stream_context uses now TSRMLS_D:
+
+PHPAPI php_stream_context *php_stream_context_alloc(TSRMLS_D)
+
+it has to be called using:
+
+context  = php_stream_context_alloc(TSRMLS_C);

Modified: php/php-src/trunk/Zend/zend_list.c
===================================================================
--- php/php-src/trunk/Zend/zend_list.c	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/Zend/zend_list.c	2010-09-16 09:13:19 UTC (rev 303414)
@@ -32,11 +32,10 @@
 static HashTable list_destructors;


-ZEND_API int zend_list_insert(void *ptr, int type)
+ZEND_API int zend_list_insert(void *ptr, int type TSRMLS_DC)
 {
 	int index;
 	zend_rsrc_list_entry le;
-	TSRMLS_FETCH();

 	le.ptr=ptr;
 	le.type=type;
@@ -92,11 +91,11 @@
 }


-ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type)
+ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type TSRMLS_DC)
 {
 	int rsrc_id;

-	rsrc_id = zend_list_insert(rsrc_pointer, rsrc_type);
+	rsrc_id = zend_list_insert(rsrc_pointer, rsrc_type TSRMLS_CC);

 	if (rsrc_result) {
 		rsrc_result->value.lval = rsrc_id;

Modified: php/php-src/trunk/Zend/zend_list.h
===================================================================
--- php/php-src/trunk/Zend/zend_list.h	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/Zend/zend_list.h	2010-09-16 09:13:19 UTC (rev 303414)
@@ -70,7 +70,7 @@
 int zend_init_rsrc_list_dtors(void);
 void zend_destroy_rsrc_list_dtors(void);

-ZEND_API int zend_list_insert(void *ptr, int type);
+ZEND_API int zend_list_insert(void *ptr, int type TSRMLS_DC);
 ZEND_API int _zend_list_addref(int id TSRMLS_DC);
 ZEND_API int _zend_list_delete(int id TSRMLS_DC);
 ZEND_API void *_zend_list_find(int id, int *type TSRMLS_DC);
@@ -79,7 +79,7 @@
 #define zend_list_delete(id)		_zend_list_delete(id TSRMLS_CC)
 #define zend_list_find(id, type)	_zend_list_find(id, type TSRMLS_CC)

-ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type);
+ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type TSRMLS_DC);
 ZEND_API void *zend_fetch_resource(zval **passed_id TSRMLS_DC, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...);

 ZEND_API char *zend_rsrc_list_get_rsrc_type(int resource TSRMLS_DC);
@@ -107,7 +107,7 @@
 	(rsrc = (rsrc_type) zend_fetch_resource(passed_id TSRMLS_CC, default_id, resource_type_name, NULL, 2, resource_type1, resource_type2))

 #define ZEND_REGISTER_RESOURCE(rsrc_result, rsrc_pointer, rsrc_type)  \
-    zend_register_resource(rsrc_result, rsrc_pointer, rsrc_type);
+    zend_register_resource(rsrc_result, rsrc_pointer, rsrc_type TSRMLS_CC);

 #define ZEND_GET_RESOURCE_TYPE_ID(le_id, le_type_name) \
     if (le_id == 0) {                                  \

Modified: php/php-src/trunk/ext/com_dotnet/com_persist.c
===================================================================
--- php/php-src/trunk/ext/com_dotnet/com_persist.c	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/ext/com_dotnet/com_persist.c	2010-09-16 09:13:19 UTC (rev 303414)
@@ -277,7 +277,7 @@
 	stm->stream = stream;

 	zend_list_addref(stream->rsrc_id);
-	stm->id = zend_list_insert(stm, le_istream);
+	stm->id = zend_list_insert(stm, le_istream TSRMLS_CC);

 	return (IStream*)stm;
 }

Modified: php/php-src/trunk/ext/com_dotnet/com_wrapper.c
===================================================================
--- php/php-src/trunk/ext/com_dotnet/com_wrapper.c	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/ext/com_dotnet/com_wrapper.c	2010-09-16 09:13:19 UTC (rev 303414)
@@ -548,7 +548,7 @@
 		Z_ADDREF_P(object);
 	disp->object = object;

-	disp->id = zend_list_insert(disp, le_dispatch);
+	disp->id = zend_list_insert(disp, le_dispatch TSRMLS_CC);

 	return disp;
 }

Modified: php/php-src/trunk/ext/interbase/ibase_query.c
===================================================================
--- php/php-src/trunk/ext/interbase/ibase_query.c	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/ext/interbase/ibase_query.c	2010-09-16 09:13:19 UTC (rev 303414)
@@ -1857,7 +1857,7 @@
 			if (ib_query->statement_type == isc_info_sql_stmt_exec_procedure) {
 				result->stmt = NULL;
 			}
-			ib_query->result_res_id = zend_list_insert(result, le_result);
+			ib_query->result_res_id = zend_list_insert(result, le_result TSRMLS_CC);
 			RETVAL_RESOURCE(ib_query->result_res_id);
 		}
 	} while (0);

Modified: php/php-src/trunk/ext/libxml/libxml.c
===================================================================
--- php/php-src/trunk/ext/libxml/libxml.c	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/ext/libxml/libxml.c	2010-09-16 09:13:19 UTC (rev 303414)
@@ -313,7 +313,7 @@
 	}

 	if (LIBXML(stream_context)) {
-		context = zend_fetch_resource(&LIBXML(stream_context) TSRMLS_CC, -1, "Stream-Context", NULL, 1, php_le_stream_context());
+		context = zend_fetch_resource(&LIBXML(stream_context) TSRMLS_CC, -1, "Stream-Context", NULL, 1, php_le_stream_context(TSRMLS_C));
 	}

 	ret_val = php_stream_open_wrapper_ex(path_to_open, (char *)mode, REPORT_ERRORS, NULL, context);

Modified: php/php-src/trunk/ext/mssql/php_mssql.c
===================================================================
--- php/php-src/trunk/ext/mssql/php_mssql.c	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/ext/mssql/php_mssql.c	2010-09-16 09:13:19 UTC (rev 303414)
@@ -1998,7 +1998,7 @@
 	statement->link = mssql_ptr;
 	statement->executed=FALSE;

-	statement->id = zend_list_insert(statement,le_statement);
+	statement->id = zend_list_insert(statement,le_statement TSRMLS_CC);

 	RETURN_RESOURCE(statement->id);
 }

Modified: php/php-src/trunk/ext/oci8/oci8.c
===================================================================
--- php/php-src/trunk/ext/oci8/oci8.c	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/ext/oci8/oci8.c	2010-09-16 09:13:19 UTC (rev 303414)
@@ -1909,7 +1909,7 @@
 								memcmp(tmp->hash_key, hashed_details.c, hashed_details.len) == 0 && zend_list_addref(connection->rsrc_id) == SUCCESS) {
 								/* do nothing */
 							} else {
-								connection->rsrc_id = zend_list_insert(connection, le_pconnection);
+								connection->rsrc_id = zend_list_insert(connection, le_pconnection TSRMLS_CC);
 								/* Persistent connections: For old close semantics we artificially
 								 * bump up the refcount to prevent the non-persistent destructor
 								 * from getting called until request shutdown. The refcount is
@@ -2053,7 +2053,7 @@
 		new_le.ptr = connection;
 		new_le.type = le_pconnection;
 		connection->used_this_request = 1;
-		connection->rsrc_id = zend_list_insert(connection, le_pconnection);
+		connection->rsrc_id = zend_list_insert(connection, le_pconnection TSRMLS_CC);

 		/* Persistent connections: For old close semantics we artificially bump up the refcount to
 		 * prevent the non-persistent destructor from getting called until request shutdown. The
@@ -2066,13 +2066,13 @@
 		OCI_G(num_persistent)++;
 		OCI_G(num_links)++;
 	} else if (!exclusive) {
-		connection->rsrc_id = zend_list_insert(connection, le_connection);
+		connection->rsrc_id = zend_list_insert(connection, le_connection TSRMLS_CC);
 		new_le.ptr = (void *)connection->rsrc_id;
 		new_le.type = le_index_ptr;
 		zend_hash_update(&EG(regular_list), connection->hash_key, strlen(connection->hash_key)+1, (void *)&new_le, sizeof(zend_rsrc_list_entry), NULL);
 		OCI_G(num_links)++;
 	} else {
-		connection->rsrc_id = zend_list_insert(connection, le_connection);
+		connection->rsrc_id = zend_list_insert(connection, le_connection TSRMLS_CC);
 		OCI_G(num_links)++;
 	}

@@ -2765,7 +2765,7 @@
 		}
 		spool_le.ptr  = session_pool;
 		spool_le.type = le_psessionpool;
-		zend_list_insert(session_pool, le_psessionpool);
+		zend_list_insert(session_pool, le_psessionpool TSRMLS_CC);
 		zend_hash_update(&EG(persistent_list), session_pool->spool_hash_key, strlen(session_pool->spool_hash_key)+1,(void *)&spool_le, sizeof(zend_rsrc_list_entry),NULL);
 	} else if (spool_out_le->type == le_psessionpool &&
 		strlen(((php_oci_spool *)(spool_out_le->ptr))->spool_hash_key) == spool_hashed_details.len &&

Modified: php/php-src/trunk/ext/odbc/birdstep.c
===================================================================
--- php/php-src/trunk/ext/odbc/birdstep.c	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/ext/odbc/birdstep.c	2010-09-16 09:13:19 UTC (rev 303414)
@@ -224,11 +224,11 @@

 /* Some internal functions. Connections and result manupulate */

-static int birdstep_add_conn(HashTable *list,VConn *conn,HDBC hdbc)
+static int birdstep_add_conn(HashTable *list,VConn *conn,HDBC hdbc TSRMLS_DC)
 {
 	int ind;

-	ind = zend_list_insert(conn,php_birdstep_module.le_link);
+	ind = zend_list_insert(conn,php_birdstep_module.le_link TSRMLS_CC);
 	conn->hdbc = hdbc;
 	conn->index = ind;

@@ -314,7 +314,7 @@
 		RETURN_FALSE;
 	}
 	new = (VConn *)emalloc(sizeof(VConn));
-	ind = birdstep_add_conn(list,new,hdbc);
+	ind = birdstep_add_conn(list,new,hdbc TSRMLS_CC);
 	php_birdstep_module.num_links++;
 	RETURN_LONG(ind);
 }

Modified: php/php-src/trunk/ext/openssl/openssl.c
===================================================================
--- php/php-src/trunk/ext/openssl/openssl.c	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/ext/openssl/openssl.c	2010-09-16 09:13:19 UTC (rev 303414)
@@ -1236,7 +1236,7 @@
 	}

 	if (cert && makeresource && resourceval) {
-		*resourceval = zend_list_insert(cert, le_x509);
+		*resourceval = zend_list_insert(cert, le_x509 TSRMLS_CC);
 	}
 	return cert;
 }
@@ -2435,7 +2435,7 @@
 	}

 	/* Succeeded; lets return the cert */
-	RETVAL_RESOURCE(zend_list_insert(new_cert, le_x509));
+	RETVAL_RESOURCE(zend_list_insert(new_cert, le_x509 TSRMLS_CC));
 	new_cert = NULL;

 cleanup:
@@ -2512,7 +2512,7 @@
 						RETVAL_TRUE;

 						if (X509_REQ_sign(csr, req.priv_key, req.digest)) {
-							RETVAL_RESOURCE(zend_list_insert(csr, le_csr));
+							RETVAL_RESOURCE(zend_list_insert(csr, le_csr TSRMLS_CC));
 							csr = NULL;
 						} else {
 							php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error signing request");
@@ -2521,7 +2521,7 @@
 						if (we_made_the_key) {
 							/* and a resource for the private key */
 							zval_dtor(out_pkey);
-							ZVAL_RESOURCE(out_pkey, zend_list_insert(req.priv_key, le_key));
+							ZVAL_RESOURCE(out_pkey, zend_list_insert(req.priv_key, le_key TSRMLS_CC));
 							req.priv_key = NULL; /* make sure the cleanup code doesn't zap it! */
 						} else if (key_resource != -1) {
 							req.priv_key = NULL; /* make sure the cleanup code doesn't zap it! */
@@ -2594,7 +2594,7 @@
 	}

 	tpubkey=X509_REQ_get_pubkey(csr);
-	RETVAL_RESOURCE(zend_list_insert(tpubkey, le_key));
+	RETVAL_RESOURCE(zend_list_insert(tpubkey, le_key TSRMLS_CC));
 	return;
 }
 /* }}} */
@@ -2948,7 +2948,7 @@
 					OPENSSL_PKEY_SET_BN(Z_ARRVAL_PP(data), rsa, iqmp);
 					if (rsa->n && rsa->d) {
 						if (EVP_PKEY_assign_RSA(pkey, rsa)) {
-							RETURN_RESOURCE(zend_list_insert(pkey, le_key));
+							RETURN_RESOURCE(zend_list_insert(pkey, le_key TSRMLS_CC));
 						}
 					}
 					RSA_free(rsa);
@@ -2972,7 +2972,7 @@
 							DSA_generate_key(dsa);
 						}
 						if (EVP_PKEY_assign_DSA(pkey, dsa)) {
-							RETURN_RESOURCE(zend_list_insert(pkey, le_key));
+							RETURN_RESOURCE(zend_list_insert(pkey, le_key TSRMLS_CC));
 						}
 					}
 					DSA_free(dsa);
@@ -2995,7 +2995,7 @@
 							DH_generate_key(dh);
 						}
 						if (EVP_PKEY_assign_DH(pkey, dh)) {
-							RETURN_RESOURCE(zend_list_insert(pkey, le_key));
+							RETURN_RESOURCE(zend_list_insert(pkey, le_key TSRMLS_CC));
 						}
 					}
 					DH_free(dh);
@@ -3012,7 +3012,7 @@
 	{
 		if (php_openssl_generate_private_key(&req TSRMLS_CC)) {
 			/* pass back a key resource */
-			RETVAL_RESOURCE(zend_list_insert(req.priv_key, le_key));
+			RETVAL_RESOURCE(zend_list_insert(req.priv_key, le_key TSRMLS_CC));
 			/* make sure the cleanup code doesn't zap it! */
 			req.priv_key = NULL;
 		}

Modified: php/php-src/trunk/ext/openssl/xp_ssl.c
===================================================================
--- php/php-src/trunk/ext/openssl/xp_ssl.c	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/ext/openssl/xp_ssl.c	2010-09-16 09:13:19 UTC (rev 303414)
@@ -471,7 +471,7 @@
 							zval_is_true(*val)) {
 						MAKE_STD_ZVAL(zcert);
 						ZVAL_RESOURCE(zcert, zend_list_insert(peer_cert,
-									php_openssl_get_x509_list_id()));
+									php_openssl_get_x509_list_id() TSRMLS_CC));
 						php_stream_context_set_option(stream->context,
 								"ssl", "peer_certificate",
 								zcert);
@@ -500,7 +500,7 @@
 								MAKE_STD_ZVAL(zcert);
 								ZVAL_RESOURCE(zcert,
 										zend_list_insert(mycert,
-											php_openssl_get_x509_list_id()));
+											php_openssl_get_x509_list_id() TSRMLS_CC));
 								add_next_index_zval(arr, zcert);
 								FREE_ZVAL(zcert);
 							}

Modified: php/php-src/trunk/ext/pgsql/pgsql.c
===================================================================
--- php/php-src/trunk/ext/pgsql/pgsql.c	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/ext/pgsql/pgsql.c	2010-09-16 09:13:19 UTC (rev 303414)
@@ -3169,7 +3169,7 @@
 				} else {
 					pgsql_lofp->conn = pgsql;
 					pgsql_lofp->lofd = pgsql_lofd;
-					Z_LVAL_P(return_value) = zend_list_insert(pgsql_lofp, le_lofp);
+					Z_LVAL_P(return_value) = zend_list_insert(pgsql_lofp, le_lofp TSRMLS_CC);
 					Z_TYPE_P(return_value) = IS_LONG;
 				}
 			}

Modified: php/php-src/trunk/ext/pspell/pspell.c
===================================================================
--- php/php-src/trunk/ext/pspell/pspell.c	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/ext/pspell/pspell.c	2010-09-16 09:13:19 UTC (rev 303414)
@@ -347,7 +347,7 @@
 	}

 	manager = to_pspell_manager(ret);
-	ind = zend_list_insert(manager, le_pspell);
+	ind = zend_list_insert(manager, le_pspell TSRMLS_CC);
 	RETURN_LONG(ind);
 }
 /* }}} */

Modified: php/php-src/trunk/ext/shmop/shmop.c
===================================================================
--- php/php-src/trunk/ext/shmop/shmop.c	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/ext/shmop/shmop.c	2010-09-16 09:13:19 UTC (rev 303414)
@@ -226,7 +226,7 @@

 	shmop->size = shm.shm_segsz;

-	rsid = zend_list_insert(shmop, shm_type);
+	rsid = zend_list_insert(shmop, shm_type TSRMLS_CC);
 	RETURN_LONG(rsid);
 err:
 	efree(shmop);

Modified: php/php-src/trunk/ext/soap/php_http.c
===================================================================
--- php/php-src/trunk/ext/soap/php_http.c	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/ext/soap/php_http.c	2010-09-16 09:13:19 UTC (rev 303414)
@@ -380,7 +380,7 @@

 	if (stream) {
 		zval **cookies, **login, **password;
-	  int ret = zend_list_insert(phpurl, le_url);
+	  int ret = zend_list_insert(phpurl, le_url TSRMLS_CC);

 		add_property_resource(this_ptr, "httpurl", ret);
 		/*zend_list_addref(ret);*/

Modified: php/php-src/trunk/ext/soap/soap.c
===================================================================
--- php/php-src/trunk/ext/soap/soap.c	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/ext/soap/soap.c	2010-09-16 09:13:19 UTC (rev 303414)
@@ -1298,7 +1298,7 @@
 		service->typemap = soap_create_typemap(service->sdl, typemap_ht TSRMLS_CC);
 	}

-	ret = zend_list_insert(service, le_service);
+	ret = zend_list_insert(service, le_service TSRMLS_CC);
 	add_property_resource(this_ptr, "service", ret);

 	SOAP_SERVER_END_CODE();
@@ -2621,7 +2621,7 @@
 		SOAP_GLOBAL(soap_version) = soap_version;

 		sdl = get_sdl(this_ptr, Z_STRVAL_P(wsdl), cache_wsdl TSRMLS_CC);
-		ret = zend_list_insert(sdl, le_sdl);
+		ret = zend_list_insert(sdl, le_sdl TSRMLS_CC);

 		add_property_resource(this_ptr, "sdl", ret);

@@ -2633,7 +2633,7 @@
 		if (typemap) {
 			int ret;

-			ret = zend_list_insert(typemap, le_typemap);
+			ret = zend_list_insert(typemap, le_typemap TSRMLS_CC);
 			add_property_resource(this_ptr, "typemap", ret);
 		}
 	}

Modified: php/php-src/trunk/ext/standard/file.c
===================================================================
--- php/php-src/trunk/ext/standard/file.c	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/ext/standard/file.c	2010-09-16 09:13:19 UTC (rev 303414)
@@ -138,7 +138,7 @@
 /* sharing globals is *evil* */
 static int le_stream_context = FAILURE;

-PHPAPI int php_le_stream_context(void)
+PHPAPI int php_le_stream_context(TSRMLS_D)
 {
 	return le_stream_context;
 }

Modified: php/php-src/trunk/ext/standard/file.h
===================================================================
--- php/php-src/trunk/ext/standard/file.h	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/ext/standard/file.h	2010-09-16 09:13:19 UTC (rev 303414)
@@ -72,7 +72,7 @@

 PHP_MINIT_FUNCTION(user_streams);

-PHPAPI int php_le_stream_context(void);
+PHPAPI int php_le_stream_context(TSRMLS_D);
 PHPAPI int php_set_sock_blocking(int socketd, int block TSRMLS_DC);
 PHPAPI int php_copy_file(char *src, char *dest TSRMLS_DC);
 PHPAPI int php_copy_file_ex(char *src, char *dest, int src_chk TSRMLS_DC);

Modified: php/php-src/trunk/ext/standard/streamsfuncs.c
===================================================================
--- php/php-src/trunk/ext/standard/streamsfuncs.c	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/ext/standard/streamsfuncs.c	2010-09-16 09:13:19 UTC (rev 303414)
@@ -953,7 +953,7 @@
 {
 	php_stream_context *context = NULL;

-	context = zend_fetch_resource(&contextresource TSRMLS_CC, -1, NULL, NULL, 1, php_le_stream_context());
+	context = zend_fetch_resource(&contextresource TSRMLS_CC, -1, NULL, NULL, 1, php_le_stream_context(TSRMLS_C));
 	if (context == NULL) {
 		php_stream *stream;


Modified: php/php-src/trunk/ext/sysvmsg/sysvmsg.c
===================================================================
--- php/php-src/trunk/ext/sysvmsg/sysvmsg.c	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/ext/sysvmsg/sysvmsg.c	2010-09-16 09:13:19 UTC (rev 303414)
@@ -271,7 +271,7 @@
 			RETURN_FALSE;
 		}
 	}
-	RETVAL_RESOURCE(zend_list_insert(mq, le_sysvmsg));
+	RETVAL_RESOURCE(zend_list_insert(mq, le_sysvmsg TSRMLS_CC));
 }
 /* }}} */


Modified: php/php-src/trunk/main/streams/php_stream_context.h
===================================================================
--- php/php-src/trunk/main/streams/php_stream_context.h	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/main/streams/php_stream_context.h	2010-09-16 09:13:19 UTC (rev 303414)
@@ -33,7 +33,7 @@
    If no context was passed, use the default context
    The the default context has not yet been created, do it now. */
 #define php_stream_context_from_zval(zcontext, nocontext) ( \
-		(zcontext) ? zend_fetch_resource(&(zcontext) TSRMLS_CC, -1, "Stream-Context", NULL, 1, php_le_stream_context()) : \
+		(zcontext) ? zend_fetch_resource(&(zcontext) TSRMLS_CC, -1, "Stream-Context", NULL, 1, php_le_stream_context(TSRMLS_C)) : \
 		(nocontext) ? NULL : \
 		FG(default_context) ? FG(default_context) : \
 		(FG(default_context) = php_stream_context_alloc()) )

Modified: php/php-src/trunk/main/streams/streams.c
===================================================================
--- php/php-src/trunk/main/streams/streams.c	2010-09-16 09:12:01 UTC (rev 303413)
+++ php/php-src/trunk/main/streams/streams.c	2010-09-16 09:13:19 UTC (rev 303414)
@@ -1998,7 +1998,7 @@
 	efree(context);
 }

-PHPAPI php_stream_context *php_stream_context_alloc(void)
+PHPAPI php_stream_context *php_stream_context_alloc(TSRMLS_D)
 {
 	php_stream_context *context;

@@ -2007,7 +2007,7 @@
 	MAKE_STD_ZVAL(context->options);
 	array_init(context->options);

-	context->rsrc_id = ZEND_REGISTER_RESOURCE(NULL, context, php_le_stream_context());
+	context->rsrc_id = ZEND_REGISTER_RESOURCE(NULL, context, php_le_stream_context(TSRMLS_C));
 	return context;
 }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to