diff options
author | Reeze Xia <reeze@php.net> | 2015-03-08 19:24:50 +0800 |
---|---|---|
committer | Reeze Xia <reeze@php.net> | 2015-03-08 19:25:55 +0800 |
commit | 609f05fc19864384fe03a4b97ad263cc0aaf32a0 (patch) | |
tree | 0639ad2ab04698e5f7187ab2b068f5c88286b1cf | |
parent | 0cb869d908ab0427ede6596009176c22b43a2aae (diff) | |
download | php-git-609f05fc19864384fe03a4b97ad263cc0aaf32a0.tar.gz |
ZTS cleanup
-rw-r--r-- | ext/interbase/ibase_blobs.c | 6 | ||||
-rw-r--r-- | ext/interbase/ibase_query.c | 19 | ||||
-rw-r--r-- | ext/interbase/ibase_service.c | 3 | ||||
-rw-r--r-- | ext/json/json_parser.tab.c | 2 | ||||
-rw-r--r-- | ext/json/json_parser.y | 2 | ||||
-rw-r--r-- | ext/pcre/php_pcre.c | 2 | ||||
-rw-r--r-- | ext/pdo_pgsql/pgsql_driver.c | 2 | ||||
-rw-r--r-- | ext/pgsql/pgsql.c | 4 | ||||
-rw-r--r-- | ext/phar/makestub.php | 2 | ||||
-rw-r--r-- | ext/session/mod_user.c | 2 | ||||
-rw-r--r-- | ext/session/session.c | 4 | ||||
-rw-r--r-- | ext/sockets/sockaddr_conv.c | 2 | ||||
-rw-r--r-- | ext/standard/assert.c | 12 | ||||
-rw-r--r-- | ext/standard/dns.c | 2 | ||||
-rw-r--r-- | main/streams/memory.c | 2 |
15 files changed, 32 insertions, 34 deletions
diff --git a/ext/interbase/ibase_blobs.c b/ext/interbase/ibase_blobs.c index b6bda55c1a..6134694932 100644 --- a/ext/interbase/ibase_blobs.c +++ b/ext/interbase/ibase_blobs.c @@ -300,7 +300,7 @@ PHP_FUNCTION(ibase_blob_add) RESET_ERRMSG; - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr", &blob_arg, &string_arg)) { + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "rr", &blob_arg, &string_arg)) { return; } @@ -327,7 +327,7 @@ PHP_FUNCTION(ibase_blob_get) RESET_ERRMSG; - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &blob_arg, &len_arg)) { + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &blob_arg, &len_arg)) { return; } @@ -352,7 +352,7 @@ static void _php_ibase_blob_end(INTERNAL_FUNCTION_PARAMETERS, int bl_end) /* {{{ RESET_ERRMSG; - if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &blob_arg)) { + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "r", &blob_arg)) { return; } diff --git a/ext/interbase/ibase_query.c b/ext/interbase/ibase_query.c index 1d75bd8f3a..46b3650b01 100644 --- a/ext/interbase/ibase_query.c +++ b/ext/interbase/ibase_query.c @@ -292,8 +292,8 @@ static int _php_ibase_alloc_array(ibase_array **ib_arrayp, XSQLDA *sqlda, /* {{{ * were mentioned erroneously. */ default: - _php_ibase_module_error("Unsupported array type %d in relation '%s' column '%s'" - TSRMLS_CC, ar_desc->array_desc_dtype, var->relname, var->sqlname); + _php_ibase_module_error("Unsupported array type %d in relation '%s' column '%s'", + ar_desc->array_desc_dtype, var->relname, var->sqlname); efree(ar); return FAILURE; } /* switch array_desc_type */ @@ -511,8 +511,8 @@ static int _php_ibase_bind_array(zval *val, char *buf, unsigned long buf_size, / convert_to_string(val); if (!sscanf(Z_STRVAL_P(val), "%Lf", &l)) { - _php_ibase_module_error("Cannot convert '%s' to long double" - TSRMLS_CC, Z_STRVAL_P(val)); + _php_ibase_module_error("Cannot convert '%s' to long double", + Z_STRVAL_P(val)); return FAILURE; } @@ -558,8 +558,8 @@ static int _php_ibase_bind_array(zval *val, char *buf, unsigned long buf_size, / #else convert_to_string(val); if (!sscanf(Z_STRVAL_P(val), "%" LL_MASK "d", &l)) { - _php_ibase_module_error("Cannot convert '%s' to long integer" - TSRMLS_CC, Z_STRVAL_P(val)); + _php_ibase_module_error("Cannot convert '%s' to long integer", + Z_STRVAL_P(val)); return FAILURE; } else { *(ISC_INT64 *) buf = l; @@ -776,8 +776,7 @@ static int _php_ibase_bind(XSQLDA *sqlda, zval *b_vars, BIND_BUF *buf, /* {{{ */ if (FAILURE == _php_ibase_bind_array(b_var, array_data, ar->ar_size, ar, 0)) { - _php_ibase_module_error("Parameter %d: failed to bind array argument" - TSRMLS_CC,i+1); + _php_ibase_module_error("Parameter %d: failed to bind array argument", i+1); efree(array_data); rv = FAILURE; continue; @@ -1100,8 +1099,8 @@ PHP_FUNCTION(ibase_query) } /* the statement is 'CREATE DATABASE ...' if the link argument is IBASE_CREATE */ - if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() - TSRMLS_CC, "ls", &l, &query, &query_len) && l == PHP_IBASE_CREATE) { + if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), + "ls", &l, &query, &query_len) && l == PHP_IBASE_CREATE) { isc_db_handle db = NULL; isc_tr_handle trans = NULL; diff --git a/ext/interbase/ibase_service.c b/ext/interbase/ibase_service.c index a7133bd90e..53795f6668 100644 --- a/ext/interbase/ibase_service.c +++ b/ext/interbase/ibase_service.c @@ -162,8 +162,7 @@ static void _php_ibase_user(INTERNAL_FUNCTION_PARAMETERS, char operation) /* {{{ user_flags[i], (char)args_len[i], (char)(args_len[i] >> 8), args[i]); if ((spb_len + chunk) > sizeof(buf) || chunk <= 0) { - _php_ibase_module_error("Internal error: insufficient buffer space for SPB (%d)" - TSRMLS_CC, spb_len); + _php_ibase_module_error("Internal error: insufficient buffer space for SPB (%d)", spb_len); RETURN_FALSE; } spb_len += chunk; diff --git a/ext/json/json_parser.tab.c b/ext/json/json_parser.tab.c index 5d2f9ca4aa..a2832aae65 100644 --- a/ext/json/json_parser.tab.c +++ b/ext/json/json_parser.tab.c @@ -1826,7 +1826,7 @@ void php_json_parser_object_update(php_json_parser *parser, zval *object, zval * key = "_empty_"; key_len = sizeof("_empty_") - 1; } - add_property_zval_ex(object, key, key_len, zvalue TSRMLS_CC); + add_property_zval_ex(object, key, key_len, zvalue); if (Z_REFCOUNTED_P(zvalue)) { Z_DELREF_P(zvalue); diff --git a/ext/json/json_parser.y b/ext/json/json_parser.y index de100dbdae..0c4ec07936 100644 --- a/ext/json/json_parser.y +++ b/ext/json/json_parser.y @@ -197,7 +197,7 @@ void php_json_parser_object_update(php_json_parser *parser, zval *object, zval * key = "_empty_"; key_len = sizeof("_empty_") - 1; } - add_property_zval_ex(object, key, key_len, zvalue TSRMLS_CC); + add_property_zval_ex(object, key, key_len, zvalue); if (Z_REFCOUNTED_P(zvalue)) { Z_DELREF_P(zvalue); diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 502ec57f42..27440bb490 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1055,7 +1055,7 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *su extra->match_limit_recursion = (unsigned long)PCRE_G(recursion_limit); if (pce->preg_options & PREG_REPLACE_EVAL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "The /e modifier is no longer supported, use preg_replace_callback instead"); + php_error_docref(NULL, E_WARNING, "The /e modifier is no longer supported, use preg_replace_callback instead"); return NULL; } if (!is_callable_replace) { diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index e4e202c9f9..ff1dbf23b5 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -387,7 +387,7 @@ static int pdo_pgsql_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *return_ break; case PDO_PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT: - php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT is deprecated, use PDO::ATTR_EMULATE_PREPARES instead"); + php_error_docref(NULL, E_DEPRECATED, "PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT is deprecated, use PDO::ATTR_EMULATE_PREPARES instead"); ZVAL_BOOL(return_value, H->disable_native_prepares); break; diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 4ea3c7d220..2e8c6633db 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -5737,7 +5737,7 @@ static int php_pgsql_convert_match(const char *str, size_t str_len, const char * } if ((re = pcre_compile(regex, options, &err_msg, &err_offset, NULL)) == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot compile regex"); + php_error_docref(NULL, E_WARNING, "Cannot compile regex"); return FAILURE; } @@ -5747,7 +5747,7 @@ static int php_pgsql_convert_match(const char *str, size_t str_len, const char * if (res == PCRE_ERROR_NOMATCH) { return FAILURE; } else if (res) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot exec regex"); + php_error_docref(NULL, E_WARNING, "Cannot exec regex"); return FAILURE; } return SUCCESS; diff --git a/ext/phar/makestub.php b/ext/phar/makestub.php index 2bb30e96d8..2f3c09fa4d 100644 --- a/ext/phar/makestub.php +++ b/ext/phar/makestub.php @@ -50,7 +50,7 @@ $stub = '/* /* $Id$ */ -static inline void phar_get_stub(const char *index_php, const char *web, size_t *len, char **stub, const int name_len, const int web_len TSRMLS_DC) +static inline void phar_get_stub(const char *index_php, const char *web, size_t *len, char **stub, const int name_len, const int web_len) { '; $s1split = str_split($s1, 2046); diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c index 89a3eca205..1196d867af 100644 --- a/ext/session/mod_user.c +++ b/ext/session/mod_user.c @@ -222,7 +222,7 @@ PS_VALIDATE_SID_FUNC(user) } /* dummy function defined by PS_MOD */ - return php_session_validate_sid(mod_data, key TSRMLS_CC); + return php_session_validate_sid(mod_data, key); } PS_UPDATE_TIMESTAMP_FUNC(user) diff --git a/ext/session/session.c b/ext/session/session.c index 6afdc73757..8c5943a28c 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -2202,7 +2202,7 @@ static PHP_FUNCTION(session_start) } if (PS(id) && !(PS(id)->len)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot start session with empty session ID"); + php_error_docref(NULL, E_WARNING, "Cannot start session with empty session ID"); RETURN_FALSE; } @@ -2632,7 +2632,7 @@ static PHP_MINIT_FUNCTION(session) /* {{{ */ php_session_id_iface_entry->ce_flags |= ZEND_ACC_INTERFACE; INIT_CLASS_ENTRY(ce, PS_UPDATE_TIMESTAMP_IFACE_NAME, php_session_update_timestamp_iface_functions); - php_session_update_timestamp_iface_entry = zend_register_internal_class(&ce TSRMLS_CC); + php_session_update_timestamp_iface_entry = zend_register_internal_class(&ce); php_session_update_timestamp_iface_entry->ce_flags |= ZEND_ACC_INTERFACE; /* Register base class */ diff --git a/ext/sockets/sockaddr_conv.c b/ext/sockets/sockaddr_conv.c index 344c806049..73a0085720 100644 --- a/ext/sockets/sockaddr_conv.c +++ b/ext/sockets/sockaddr_conv.c @@ -9,7 +9,7 @@ #include <arpa/inet.h> #endif -extern int php_string_to_if_index(const char *val, unsigned *out TSRMLS_DC); +extern int php_string_to_if_index(const char *val, unsigned *out); #if HAVE_IPV6 /* Sets addr by hostname, or by ip in string form (AF_INET6) */ diff --git a/ext/standard/assert.c b/ext/standard/assert.c index 3eb870dd67..59db4068bd 100644 --- a/ext/standard/assert.c +++ b/ext/standard/assert.c @@ -114,7 +114,7 @@ PHP_MINIT_FUNCTION(assert) /* {{{ */ REGISTER_LONG_CONSTANT("ASSERT_EXCEPTION", ASSERT_EXCEPTION, CONST_CS|CONST_PERSISTENT); INIT_CLASS_ENTRY(ce, "AssertionException", NULL); - assertion_exception_ce = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C)); + assertion_exception_ce = zend_register_internal_class_ex(&ce, zend_exception_get_default()); return SUCCESS; } @@ -244,14 +244,14 @@ PHP_FUNCTION(assert) if (ASSERTG(exception)) { if (!description) { - zend_throw_exception(assertion_exception_ce, NULL, E_ERROR TSRMLS_CC); + zend_throw_exception(assertion_exception_ce, NULL, E_ERROR); } else if (Z_TYPE_P(description) == IS_OBJECT && - instanceof_function(Z_OBJCE_P(description), assertion_exception_ce TSRMLS_CC)) { + instanceof_function(Z_OBJCE_P(description), assertion_exception_ce)) { Z_ADDREF_P(description); - zend_throw_exception_object(description TSRMLS_CC); + zend_throw_exception_object(description); } else { zend_string *str = zval_get_string(description); - zend_throw_exception(assertion_exception_ce, str->val, E_ERROR TSRMLS_CC); + zend_throw_exception(assertion_exception_ce, str->val, E_ERROR); zend_string_release(str); } } else if (ASSERTG(warning)) { @@ -360,7 +360,7 @@ PHP_FUNCTION(assert_options) if (ac == 2) { zend_string *key = zend_string_init("assert.exception", sizeof("assert.exception")-1, 0); zend_string *val = zval_get_string(value); - zend_alter_ini_entry_ex(key, val, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC); + zend_alter_ini_entry_ex(key, val, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0); zend_string_release(val); zend_string_release(key); } diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 3bc8a239c2..0f32fde49e 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -247,7 +247,7 @@ PHP_FUNCTION(gethostbynamel) if(hostname_len > MAXFQDNLEN) { /* name too long, protect from CVE-2015-0235 */ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Host name is too long, the limit is %d characters", MAXFQDNLEN); + php_error_docref(NULL, E_WARNING, "Host name is too long, the limit is %d characters", MAXFQDNLEN); RETURN_FALSE; } diff --git a/main/streams/memory.c b/main/streams/memory.c index 9a9b11fe07..9efd1f10ac 100644 --- a/main/streams/memory.c +++ b/main/streams/memory.c @@ -376,7 +376,7 @@ static size_t php_stream_temp_write(php_stream *stream, const char *buf, size_t if (memsize + count >= ts->smax) { php_stream *file = php_stream_fopen_temporary_file(ts->tmpdir, "php", NULL); if (file == NULL) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create temporary file, Check permissions in temporary files directory."); + php_error_docref(NULL, E_WARNING, "Unable to create temporary file, Check permissions in temporary files directory."); return 0; } php_stream_write(file, membuf, memsize); |