]> granicus.if.org Git - php/commitdiff
ZTS cleanup
authorReeze Xia <reeze@php.net>
Sun, 8 Mar 2015 11:24:50 +0000 (19:24 +0800)
committerReeze Xia <reeze@php.net>
Sun, 8 Mar 2015 11:25:55 +0000 (19:25 +0800)
15 files changed:
ext/interbase/ibase_blobs.c
ext/interbase/ibase_query.c
ext/interbase/ibase_service.c
ext/json/json_parser.tab.c
ext/json/json_parser.y
ext/pcre/php_pcre.c
ext/pdo_pgsql/pgsql_driver.c
ext/pgsql/pgsql.c
ext/phar/makestub.php
ext/session/mod_user.c
ext/session/session.c
ext/sockets/sockaddr_conv.c
ext/standard/assert.c
ext/standard/dns.c
main/streams/memory.c

index b6bda55c1a2ed628ab46ea9b551eb9b763ab2fbb..613469493263e0cb8d8dadab65ecef081364a00e 100644 (file)
@@ -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;
        }
 
index 1d75bd8f3a8c75b442040e9b96ec66850687180a..46b3650b0157129199d4b852c2d7661f08c92a5f 100644 (file)
@@ -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;
 
index a7133bd90e6125d17e6e313a52e221e60851f3df..53795f6668b317f0b6cbb878706630e48f3b510d 100644 (file)
@@ -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;
index 5d2f9ca4aa155853ca9ed159ca8d86c3ffd200a9..a2832aae653092e3e37bf8e22167da973b04ef12 100644 (file)
@@ -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);
index de100dbdae8da042c93cae5daad5a54df9748dbd..0c4ec07936cf85206197dcdebb4915e501939aa7 100644 (file)
@@ -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);
index 502ec57f4234f10fd3fb21481b013dba2adefab3..27440bb49049400816243ccb1148f7a6553a0f0c 100644 (file)
@@ -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) {
index e4e202c9f9e390cdb2f35c2399d072408acfe49f..ff1dbf23b5645f8efd96460b1fce0d4403b8df2c 100644 (file)
@@ -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;
 
index 4ea3c7d220aad4bae3e8aed4aa0c2052e3b817eb..2e8c6633dbc7bd1073b137308472924b53d8b474 100644 (file)
@@ -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;
index 2bb30e96d8375ad6df1cb1284f01098f74c6e2d1..2f3c09fa4de2a20006587f914ed5499bb7509481 100644 (file)
@@ -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);
index 89a3eca205b8d5153184493b5fbce41d85d98b62..1196d867af59ba95969d4c12ecd2b2ed79f3c0e5 100644 (file)
@@ -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)
index 6afdc737578a34f9444fab93f7c3f2700a7ee9ff..8c5943a28c864eeb70a2f86163ef2f4b27937c23 100644 (file)
@@ -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 */
index 344c80604950a0da6c83ec7b4f31bc1f81a46fcc..73a008572037614bade8462680ec7841b99c2c82 100644 (file)
@@ -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) */
index 3eb870dd67222cdde19ab7c40b37e89eae1f8656..59db4068bd3e24bf7e6d5b530f9464a5438168aa 100644 (file)
@@ -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);
                }
index 3bc8a239c215473bbeefb716795cd5d370e5ce9c..0f32fde49ed4b39b62023a3bd7c40bca200f47f9 100644 (file)
@@ -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;
        }
 
index 9a9b11fe07857240d0260ed030fbc8da03d8b55b..9efd1f10ac340a40b737f500f649fe7e5803053d 100644 (file)
@@ -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);