summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Bergmann <sebastian@php.net>2005-08-12 14:08:28 +0000
committerSebastian Bergmann <sebastian@php.net>2005-08-12 14:08:28 +0000
commit52b001cc05fa1fb085aca9189a108d7029e9c463 (patch)
tree0d5070c5f24f817647ed245fd6af4409498f3431
parent3aad9e2048217f0161f6a9fb50ac334f44d8fcc1 (diff)
downloadphp-git-52b001cc05fa1fb085aca9189a108d7029e9c463.tar.gz
ZTS fixes.
-rw-r--r--Zend/zend_exceptions.c4
-rw-r--r--Zend/zend_exceptions.h4
-rw-r--r--Zend/zend_reflection_api.c2
-rw-r--r--ext/com_dotnet/com_extension.c2
-rw-r--r--ext/dom/php_dom.c2
-rw-r--r--ext/mysql/php_mysql.c6
-rw-r--r--ext/mysqli/mysqli.c8
-rw-r--r--ext/mysqli/mysqli_driver.c2
-rw-r--r--ext/pgsql/pgsql.c6
-rw-r--r--ext/reflection/php_reflection.c2
-rw-r--r--ext/simplexml/php_simplexml.h2
-rw-r--r--ext/simplexml/simplexml.c6
-rw-r--r--ext/soap/soap.c2
-rwxr-xr-xext/spl/spl_exceptions.c2
-rwxr-xr-xext/spl/spl_iterators.c2
-rwxr-xr-xext/spl/spl_sxe.c2
-rw-r--r--ext/sqlite/pdo_sqlite2.c4
-rw-r--r--ext/sqlite/sqlite.c2
-rw-r--r--ext/tidy/tidy.c2
19 files changed, 31 insertions, 31 deletions
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index a28a96354f..c167474260 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -588,12 +588,12 @@ void zend_register_default_exception(TSRMLS_D)
zend_declare_property_long(error_exception_ce, "severity", sizeof("severity")-1, E_ERROR, ZEND_ACC_PROTECTED TSRMLS_CC);
}
-ZEND_API zend_class_entry *zend_exception_get_default(void)
+ZEND_API zend_class_entry *zend_exception_get_default(TSRMLS_D)
{
return U_CLASS_ENTRY(default_exception_ce);
}
-ZEND_API zend_class_entry *zend_get_error_exception(void)
+ZEND_API zend_class_entry *zend_get_error_exception(TSRMLS_D)
{
return U_CLASS_ENTRY(error_exception_ce);
}
diff --git a/Zend/zend_exceptions.h b/Zend/zend_exceptions.h
index 0a47062265..5c8f3a0eff 100644
--- a/Zend/zend_exceptions.h
+++ b/Zend/zend_exceptions.h
@@ -30,8 +30,8 @@ void zend_throw_exception_internal(zval *exception TSRMLS_DC);
void zend_register_default_exception(TSRMLS_D);
-ZEND_API zend_class_entry *zend_exception_get_default(void);
-ZEND_API zend_class_entry *zend_get_error_exception(void);
+ZEND_API zend_class_entry *zend_exception_get_default(TSRMLS_D);
+ZEND_API zend_class_entry *zend_get_error_exception(TSRMLS_D);
ZEND_API void zend_register_default_classes(TSRMLS_D);
/* exception_ce NULL or zend_exception_get_default() or a derived class
diff --git a/Zend/zend_reflection_api.c b/Zend/zend_reflection_api.c
index 9677a37f68..ebc5e6accc 100644
--- a/Zend/zend_reflection_api.c
+++ b/Zend/zend_reflection_api.c
@@ -4035,7 +4035,7 @@ ZEND_API void zend_register_reflection_api(TSRMLS_D) {
reflection_object_handlers.write_property = _reflection_write_property;
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionException", reflection_exception_functions);
- reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_exception_get_default(), NULL TSRMLS_CC);
+ reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
INIT_CLASS_ENTRY(_reflection_entry, "Reflection", reflection_functions);
reflection_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC);
diff --git a/ext/com_dotnet/com_extension.c b/ext/com_dotnet/com_extension.c
index 54fa6cc9a6..de48ea943a 100644
--- a/ext/com_dotnet/com_extension.c
+++ b/ext/com_dotnet/com_extension.c
@@ -192,7 +192,7 @@ PHP_MINIT_FUNCTION(com_dotnet)
php_com_persist_minit(INIT_FUNC_ARGS_PASSTHRU);
INIT_CLASS_ENTRY(ce, "com_exception", NULL);
- php_com_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(), NULL TSRMLS_CC);
+ php_com_exception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
php_com_exception_class_entry->ce_flags |= ZEND_ACC_FINAL;
/* php_com_exception_class_entry->constructor->common.fn_flags |= ZEND_ACC_PROTECTED; */
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c
index c5c6343085..051a7841ab 100644
--- a/ext/dom/php_dom.c
+++ b/ext/dom/php_dom.c
@@ -485,7 +485,7 @@ PHP_MINIT_FUNCTION(dom)
zend_hash_init(&classes, 0, NULL, NULL, 1);
INIT_CLASS_ENTRY(ce, "DOMException", php_dom_domexception_class_functions);
- dom_domexception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(), NULL TSRMLS_CC);
+ dom_domexception_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
dom_domexception_class_entry->ce_flags |= ZEND_ACC_FINAL;
zend_declare_property_long(dom_domexception_class_entry, "code", sizeof("code")-1, 0, ZEND_ACC_PUBLIC TSRMLS_CC);
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index a24758c9fe..a15986607e 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -2032,7 +2032,7 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type,
* single value is an array. Also we'd have to make that one
* argument passed by reference.
*/
- zend_throw_exception(zend_exception_get_default(), "Parameter ctor_params must be an array", 0 TSRMLS_CC);
+ zend_throw_exception(zend_exception_get_default(TSRMLS_C), "Parameter ctor_params must be an array", 0 TSRMLS_CC);
return;
}
} else {
@@ -2047,7 +2047,7 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type,
fcc.object_pp = &return_value;
if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
- zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Could not execute %v::%v()", ce->name, ce->constructor->common.function_name);
+ zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Could not execute %v::%v()", ce->name, ce->constructor->common.function_name);
} else {
if (retval_ptr) {
zval_ptr_dtor(&retval_ptr);
@@ -2057,7 +2057,7 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type,
efree(fci.params);
}
} else if (ctor_params) {
- zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Class %v does not have a constructor hence you cannot use ctor_params", ce->name);
+ zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Class %v does not have a constructor hence you cannot use ctor_params", ce->name);
}
}
}
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 5307f45ed0..67a4f9eecf 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -449,7 +449,7 @@ PHP_MINIT_FUNCTION(mysqli)
#ifdef HAVE_SPL
mysqli_exception_class_entry = zend_register_internal_class_ex(&cex, spl_ce_RuntimeException, NULL TSRMLS_CC);
#else
- mysqli_exception_class_entry = zend_register_internal_class_ex(&cex, zend_exception_get_default(), NULL TSRMLS_CC);
+ mysqli_exception_class_entry = zend_register_internal_class_ex(&cex, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
#endif
mysqli_exception_class_entry->ce_flags |= ZEND_ACC_FINAL;
zend_declare_property_long(mysqli_exception_class_entry, "code", sizeof("code")-1, 0, ZEND_ACC_PROTECTED TSRMLS_CC);
@@ -876,7 +876,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
* single value is an array. Also we'd have to make that one
* argument passed by reference.
*/
- zend_throw_exception(zend_exception_get_default(), "Parameter ctor_params must be an array", 0 TSRMLS_CC);
+ zend_throw_exception(zend_exception_get_default(TSRMLS_C), "Parameter ctor_params must be an array", 0 TSRMLS_CC);
return;
}
} else {
@@ -891,7 +891,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
fcc.object_pp = &return_value;
if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
- zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name);
+ zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name);
} else {
if (retval_ptr) {
zval_ptr_dtor(&retval_ptr);
@@ -901,7 +901,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
efree(fci.params);
}
} else if (ctor_params) {
- zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name);
+ zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name);
}
}
}
diff --git a/ext/mysqli/mysqli_driver.c b/ext/mysqli/mysqli_driver.c
index e63098ade6..7bd2fa5939 100644
--- a/ext/mysqli/mysqli_driver.c
+++ b/ext/mysqli/mysqli_driver.c
@@ -79,7 +79,7 @@ static int driver_report_write(mysqli_object *obj, zval *value TSRMLS_DC)
{
MyG(report_mode) = Z_LVAL_P(value);
php_set_error_handling(MyG(report_mode) & MYSQLI_REPORT_STRICT ? EH_THROW : EH_NORMAL,
- zend_exception_get_default() TSRMLS_CC);
+ zend_exception_get_default(TSRMLS_C) TSRMLS_CC);
return SUCCESS;
}
/* }}} */
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 4210f14b57..ce9b80d435 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -2009,7 +2009,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type,
* single value is an array. Also we'd have to make that one
* argument passed by reference.
*/
- zend_throw_exception(zend_exception_get_default(), "Parameter ctor_params must be an array", 0 TSRMLS_CC);
+ zend_throw_exception(zend_exception_get_default(TSRMLS_C), "Parameter ctor_params must be an array", 0 TSRMLS_CC);
return;
}
} else {
@@ -2024,7 +2024,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type,
fcc.object_pp = &return_value;
if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
- zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name);
+ zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name, ce->constructor->common.function_name);
} else {
if (retval_ptr) {
zval_ptr_dtor(&retval_ptr);
@@ -2034,7 +2034,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type,
efree(fci.params);
}
} else if (ctor_params) {
- zend_throw_exception_ex(zend_exception_get_default(), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name);
+ zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name);
}
}
}
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 9677a37f68..ebc5e6accc 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -4035,7 +4035,7 @@ ZEND_API void zend_register_reflection_api(TSRMLS_D) {
reflection_object_handlers.write_property = _reflection_write_property;
INIT_CLASS_ENTRY(_reflection_entry, "ReflectionException", reflection_exception_functions);
- reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_exception_get_default(), NULL TSRMLS_CC);
+ reflection_exception_ptr = zend_register_internal_class_ex(&_reflection_entry, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
INIT_CLASS_ENTRY(_reflection_entry, "Reflection", reflection_functions);
reflection_ptr = zend_register_internal_class(&_reflection_entry TSRMLS_CC);
diff --git a/ext/simplexml/php_simplexml.h b/ext/simplexml/php_simplexml.h
index 5a1da0f8f4..fbfe827443 100644
--- a/ext/simplexml/php_simplexml.h
+++ b/ext/simplexml/php_simplexml.h
@@ -79,7 +79,7 @@ typedef struct {
#define SIMPLEXML_G(v) (simplexml_globals.v)
#endif
-ZEND_API zend_class_entry *sxe_get_element_class_entry();
+ZEND_API zend_class_entry *sxe_get_element_class_entry(TSRMLS_D);
#endif
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 4075472e7d..8fa9e0ac3b 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -40,7 +40,7 @@
zend_class_entry *sxe_class_entry = NULL;
-ZEND_API zend_class_entry *sxe_get_element_class_entry()
+ZEND_API zend_class_entry *sxe_get_element_class_entry(TSRMLS_D)
{
return U_CLASS_ENTRY(sxe_class_entry);
}
@@ -1357,7 +1357,7 @@ SXE_METHOD(__construct)
int data_len;
xmlDocPtr docp;
- php_set_error_handling(EH_THROW, zend_exception_get_default() TSRMLS_CC);
+ php_set_error_handling(EH_THROW, zend_exception_get_default(TSRMLS_C) TSRMLS_CC);
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &data, &data_len) == FAILURE) {
php_std_error_handling();
return;
@@ -1367,7 +1367,7 @@ SXE_METHOD(__construct)
docp = xmlParseMemory(data, data_len);
if (!docp) {
((php_libxml_node_object *)sxe)->document = NULL;
- zend_throw_exception(zend_exception_get_default(), "String could not be parsed as XML", 0 TSRMLS_CC);
+ zend_throw_exception(zend_exception_get_default(TSRMLS_C), "String could not be parsed as XML", 0 TSRMLS_CC);
return;
}
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 5bbcb64330..46c078fbcb 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -525,7 +525,7 @@ PHP_MINIT_FUNCTION(soap)
/* Register SoapFault class */
INIT_CLASS_ENTRY(ce, PHP_SOAP_FAULT_CLASSNAME, soap_fault_functions);
#ifdef ZEND_ENGINE_2
- soap_fault_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(), NULL TSRMLS_CC);
+ soap_fault_class_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), NULL TSRMLS_CC);
#else
soap_fault_class_entry = zend_register_internal_class(&ce TSRMLS_CC);
#endif
diff --git a/ext/spl/spl_exceptions.c b/ext/spl/spl_exceptions.c
index 6457fc4c42..1e9584a60b 100755
--- a/ext/spl/spl_exceptions.c
+++ b/ext/spl/spl_exceptions.c
@@ -47,7 +47,7 @@ PHPAPI zend_class_entry *spl_ce_RangeException;
PHPAPI zend_class_entry *spl_ce_UnderflowException;
PHPAPI zend_class_entry *spl_ce_UnexpectedValueException;
-#define spl_ce_Exception zend_exception_get_default()
+#define spl_ce_Exception zend_exception_get_default(TSRMLS_C)
/* {{{ PHP_MINIT_FUNCTION(spl_exceptions) */
PHP_MINIT_FUNCTION(spl_exceptions)
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c
index e131ce93f5..48ec2d1883 100755
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators.c
@@ -790,7 +790,7 @@ static INLINE spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAME
break;
}
- php_set_error_handling(EH_THROW, zend_exception_get_default() TSRMLS_CC);
+ php_set_error_handling(EH_THROW, zend_exception_get_default(TSRMLS_C) TSRMLS_CC);
zobject->refcount++;
intern->inner.zobject = zobject;
diff --git a/ext/spl/spl_sxe.c b/ext/spl/spl_sxe.c
index 463f7cad1b..5880bfb0bf 100755
--- a/ext/spl/spl_sxe.c
+++ b/ext/spl/spl_sxe.c
@@ -146,7 +146,7 @@ static zend_function_entry spl_funcs_SimpleXMLIterator[] = {
SPL_API PHP_MINIT_FUNCTION(spl_sxe) /* {{{ */
{
- zend_class_entry *spl_ce_SimpleXML_Element = sxe_get_element_class_entry();
+ zend_class_entry *spl_ce_SimpleXML_Element = sxe_get_element_class_entry(TSRMLS_C);
if (!spl_ce_SimpleXML_Element) {
return SUCCESS; /* SimpleXML must be initialized before */
diff --git a/ext/sqlite/pdo_sqlite2.c b/ext/sqlite/pdo_sqlite2.c
index bd2cd0768e..b4e857d5b1 100644
--- a/ext/sqlite/pdo_sqlite2.c
+++ b/ext/sqlite/pdo_sqlite2.c
@@ -288,7 +288,7 @@ int _pdo_sqlite2_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, char *errmsg, const cha
}
if (!dbh->methods) {
- zend_throw_exception_ex(php_pdo_get_exception(), 0 TSRMLS_CC, "SQLSTATE[%s] [%d] %s",
+ zend_throw_exception_ex(php_pdo_get_exception(TSRMLS_C), 0 TSRMLS_CC, "SQLSTATE[%s] [%d] %s",
*pdo_err, einfo->errcode, einfo->errmsg);
}
@@ -576,7 +576,7 @@ static int pdo_sqlite2_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRML
filename = make_filename_safe(dbh->data_source TSRMLS_CC);
if (!filename) {
- zend_throw_exception_ex(php_pdo_get_exception(), 0 TSRMLS_CC,
+ zend_throw_exception_ex(php_pdo_get_exception(TSRMLS_C), 0 TSRMLS_CC,
"safe_mode/open_basedir prohibits opening %s",
dbh->data_source);
goto cleanup;
diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c
index e164634123..dea30603de 100644
--- a/ext/sqlite/sqlite.c
+++ b/ext/sqlite/sqlite.c
@@ -1028,7 +1028,7 @@ PHP_MINIT_FUNCTION(sqlite)
#if defined(HAVE_SPL) && ((PHP_MAJOR_VERSION > 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1))
REGISTER_SQLITE_CLASS(Exception, exception, spl_ce_RuntimeException);
#else
- REGISTER_SQLITE_CLASS(Exception, exception, zend_exception_get_default());
+ REGISTER_SQLITE_CLASS(Exception, exception, zend_exception_get_default(TSRMLS_C));
#endif
sqlite_ce_db->ce_flags &= ~ZEND_ACC_FINAL_CLASS;
diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c
index bfb844633e..655e278114 100644
--- a/ext/tidy/tidy.c
+++ b/ext/tidy/tidy.c
@@ -932,7 +932,7 @@ PHP_MINIT_FUNCTION(tidy)
REGISTER_TIDY_CLASS(tidy, doc, NULL, 0);
REGISTER_TIDY_CLASS(tidyNode, node, NULL, ZEND_ACC_FINAL_CLASS);
/* no exceptions for now..
- REGISTER_TIDY_CLASS(tidyException, exception, zend_exception_get_default());
+ REGISTER_TIDY_CLASS(tidyException, exception, zend_exception_get_default(TSRMLS_C));
*/
tidy_object_handlers_doc.get_class_entry = tidy_get_ce_doc;
tidy_object_handlers_node.get_class_entry = tidy_get_ce_node;