Skip to content

Commit 609f05f

Browse files
committed
ZTS cleanup
1 parent 0cb869d commit 609f05f

File tree

15 files changed

+32
-34
lines changed

15 files changed

+32
-34
lines changed

ext/interbase/ibase_blobs.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ PHP_FUNCTION(ibase_blob_add)
300300

301301
RESET_ERRMSG;
302302

303-
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr", &blob_arg, &string_arg)) {
303+
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "rr", &blob_arg, &string_arg)) {
304304
return;
305305
}
306306

@@ -327,7 +327,7 @@ PHP_FUNCTION(ibase_blob_get)
327327

328328
RESET_ERRMSG;
329329

330-
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &blob_arg, &len_arg)) {
330+
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &blob_arg, &len_arg)) {
331331
return;
332332
}
333333

@@ -352,7 +352,7 @@ static void _php_ibase_blob_end(INTERNAL_FUNCTION_PARAMETERS, int bl_end) /* {{{
352352

353353
RESET_ERRMSG;
354354

355-
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &blob_arg)) {
355+
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "r", &blob_arg)) {
356356
return;
357357
}
358358

ext/interbase/ibase_query.c

+9-10
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ static int _php_ibase_alloc_array(ibase_array **ib_arrayp, XSQLDA *sqlda, /* {{{
292292
* were mentioned erroneously.
293293
*/
294294
default:
295-
_php_ibase_module_error("Unsupported array type %d in relation '%s' column '%s'"
296-
TSRMLS_CC, ar_desc->array_desc_dtype, var->relname, var->sqlname);
295+
_php_ibase_module_error("Unsupported array type %d in relation '%s' column '%s'",
296+
ar_desc->array_desc_dtype, var->relname, var->sqlname);
297297
efree(ar);
298298
return FAILURE;
299299
} /* switch array_desc_type */
@@ -511,8 +511,8 @@ static int _php_ibase_bind_array(zval *val, char *buf, unsigned long buf_size, /
511511
convert_to_string(val);
512512

513513
if (!sscanf(Z_STRVAL_P(val), "%Lf", &l)) {
514-
_php_ibase_module_error("Cannot convert '%s' to long double"
515-
TSRMLS_CC, Z_STRVAL_P(val));
514+
_php_ibase_module_error("Cannot convert '%s' to long double",
515+
Z_STRVAL_P(val));
516516
return FAILURE;
517517
}
518518

@@ -558,8 +558,8 @@ static int _php_ibase_bind_array(zval *val, char *buf, unsigned long buf_size, /
558558
#else
559559
convert_to_string(val);
560560
if (!sscanf(Z_STRVAL_P(val), "%" LL_MASK "d", &l)) {
561-
_php_ibase_module_error("Cannot convert '%s' to long integer"
562-
TSRMLS_CC, Z_STRVAL_P(val));
561+
_php_ibase_module_error("Cannot convert '%s' to long integer",
562+
Z_STRVAL_P(val));
563563
return FAILURE;
564564
} else {
565565
*(ISC_INT64 *) buf = l;
@@ -776,8 +776,7 @@ static int _php_ibase_bind(XSQLDA *sqlda, zval *b_vars, BIND_BUF *buf, /* {{{ */
776776

777777
if (FAILURE == _php_ibase_bind_array(b_var, array_data, ar->ar_size,
778778
ar, 0)) {
779-
_php_ibase_module_error("Parameter %d: failed to bind array argument"
780-
TSRMLS_CC,i+1);
779+
_php_ibase_module_error("Parameter %d: failed to bind array argument", i+1);
781780
efree(array_data);
782781
rv = FAILURE;
783782
continue;
@@ -1100,8 +1099,8 @@ PHP_FUNCTION(ibase_query)
11001099
}
11011100

11021101
/* the statement is 'CREATE DATABASE ...' if the link argument is IBASE_CREATE */
1103-
if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS()
1104-
TSRMLS_CC, "ls", &l, &query, &query_len) && l == PHP_IBASE_CREATE) {
1102+
if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(),
1103+
"ls", &l, &query, &query_len) && l == PHP_IBASE_CREATE) {
11051104
isc_db_handle db = NULL;
11061105
isc_tr_handle trans = NULL;
11071106

ext/interbase/ibase_service.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,7 @@ static void _php_ibase_user(INTERNAL_FUNCTION_PARAMETERS, char operation) /* {{{
162162
user_flags[i], (char)args_len[i], (char)(args_len[i] >> 8), args[i]);
163163

164164
if ((spb_len + chunk) > sizeof(buf) || chunk <= 0) {
165-
_php_ibase_module_error("Internal error: insufficient buffer space for SPB (%d)"
166-
TSRMLS_CC, spb_len);
165+
_php_ibase_module_error("Internal error: insufficient buffer space for SPB (%d)", spb_len);
167166
RETURN_FALSE;
168167
}
169168
spb_len += chunk;

ext/json/json_parser.tab.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1826,7 +1826,7 @@ void php_json_parser_object_update(php_json_parser *parser, zval *object, zval *
18261826
key = "_empty_";
18271827
key_len = sizeof("_empty_") - 1;
18281828
}
1829-
add_property_zval_ex(object, key, key_len, zvalue TSRMLS_CC);
1829+
add_property_zval_ex(object, key, key_len, zvalue);
18301830

18311831
if (Z_REFCOUNTED_P(zvalue)) {
18321832
Z_DELREF_P(zvalue);

ext/json/json_parser.y

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ void php_json_parser_object_update(php_json_parser *parser, zval *object, zval *
197197
key = "_empty_";
198198
key_len = sizeof("_empty_") - 1;
199199
}
200-
add_property_zval_ex(object, key, key_len, zvalue TSRMLS_CC);
200+
add_property_zval_ex(object, key, key_len, zvalue);
201201

202202
if (Z_REFCOUNTED_P(zvalue)) {
203203
Z_DELREF_P(zvalue);

ext/pcre/php_pcre.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, zend_string *su
10551055
extra->match_limit_recursion = (unsigned long)PCRE_G(recursion_limit);
10561056

10571057
if (pce->preg_options & PREG_REPLACE_EVAL) {
1058-
php_error_docref(NULL TSRMLS_CC, E_WARNING, "The /e modifier is no longer supported, use preg_replace_callback instead");
1058+
php_error_docref(NULL, E_WARNING, "The /e modifier is no longer supported, use preg_replace_callback instead");
10591059
return NULL;
10601060
}
10611061
if (!is_callable_replace) {

ext/pdo_pgsql/pgsql_driver.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ static int pdo_pgsql_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *return_
387387
break;
388388

389389
case PDO_PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT:
390-
php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT is deprecated, use PDO::ATTR_EMULATE_PREPARES instead");
390+
php_error_docref(NULL, E_DEPRECATED, "PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT is deprecated, use PDO::ATTR_EMULATE_PREPARES instead");
391391
ZVAL_BOOL(return_value, H->disable_native_prepares);
392392
break;
393393

ext/pgsql/pgsql.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -5737,7 +5737,7 @@ static int php_pgsql_convert_match(const char *str, size_t str_len, const char *
57375737
}
57385738

57395739
if ((re = pcre_compile(regex, options, &err_msg, &err_offset, NULL)) == NULL) {
5740-
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot compile regex");
5740+
php_error_docref(NULL, E_WARNING, "Cannot compile regex");
57415741
return FAILURE;
57425742
}
57435743

@@ -5747,7 +5747,7 @@ static int php_pgsql_convert_match(const char *str, size_t str_len, const char *
57475747
if (res == PCRE_ERROR_NOMATCH) {
57485748
return FAILURE;
57495749
} else if (res) {
5750-
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot exec regex");
5750+
php_error_docref(NULL, E_WARNING, "Cannot exec regex");
57515751
return FAILURE;
57525752
}
57535753
return SUCCESS;

ext/phar/makestub.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
5151
/* $Id$ */
5252
53-
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)
53+
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)
5454
{
5555
';
5656
$s1split = str_split($s1, 2046);

ext/session/mod_user.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ PS_VALIDATE_SID_FUNC(user)
222222
}
223223

224224
/* dummy function defined by PS_MOD */
225-
return php_session_validate_sid(mod_data, key TSRMLS_CC);
225+
return php_session_validate_sid(mod_data, key);
226226
}
227227

228228
PS_UPDATE_TIMESTAMP_FUNC(user)

ext/session/session.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2202,7 +2202,7 @@ static PHP_FUNCTION(session_start)
22022202
}
22032203

22042204
if (PS(id) && !(PS(id)->len)) {
2205-
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot start session with empty session ID");
2205+
php_error_docref(NULL, E_WARNING, "Cannot start session with empty session ID");
22062206
RETURN_FALSE;
22072207
}
22082208

@@ -2632,7 +2632,7 @@ static PHP_MINIT_FUNCTION(session) /* {{{ */
26322632
php_session_id_iface_entry->ce_flags |= ZEND_ACC_INTERFACE;
26332633

26342634
INIT_CLASS_ENTRY(ce, PS_UPDATE_TIMESTAMP_IFACE_NAME, php_session_update_timestamp_iface_functions);
2635-
php_session_update_timestamp_iface_entry = zend_register_internal_class(&ce TSRMLS_CC);
2635+
php_session_update_timestamp_iface_entry = zend_register_internal_class(&ce);
26362636
php_session_update_timestamp_iface_entry->ce_flags |= ZEND_ACC_INTERFACE;
26372637

26382638
/* Register base class */

ext/sockets/sockaddr_conv.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <arpa/inet.h>
1010
#endif
1111

12-
extern int php_string_to_if_index(const char *val, unsigned *out TSRMLS_DC);
12+
extern int php_string_to_if_index(const char *val, unsigned *out);
1313

1414
#if HAVE_IPV6
1515
/* Sets addr by hostname, or by ip in string form (AF_INET6) */

ext/standard/assert.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ PHP_MINIT_FUNCTION(assert) /* {{{ */
114114
REGISTER_LONG_CONSTANT("ASSERT_EXCEPTION", ASSERT_EXCEPTION, CONST_CS|CONST_PERSISTENT);
115115

116116
INIT_CLASS_ENTRY(ce, "AssertionException", NULL);
117-
assertion_exception_ce = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C));
117+
assertion_exception_ce = zend_register_internal_class_ex(&ce, zend_exception_get_default());
118118

119119
return SUCCESS;
120120
}
@@ -244,14 +244,14 @@ PHP_FUNCTION(assert)
244244

245245
if (ASSERTG(exception)) {
246246
if (!description) {
247-
zend_throw_exception(assertion_exception_ce, NULL, E_ERROR TSRMLS_CC);
247+
zend_throw_exception(assertion_exception_ce, NULL, E_ERROR);
248248
} else if (Z_TYPE_P(description) == IS_OBJECT &&
249-
instanceof_function(Z_OBJCE_P(description), assertion_exception_ce TSRMLS_CC)) {
249+
instanceof_function(Z_OBJCE_P(description), assertion_exception_ce)) {
250250
Z_ADDREF_P(description);
251-
zend_throw_exception_object(description TSRMLS_CC);
251+
zend_throw_exception_object(description);
252252
} else {
253253
zend_string *str = zval_get_string(description);
254-
zend_throw_exception(assertion_exception_ce, str->val, E_ERROR TSRMLS_CC);
254+
zend_throw_exception(assertion_exception_ce, str->val, E_ERROR);
255255
zend_string_release(str);
256256
}
257257
} else if (ASSERTG(warning)) {
@@ -360,7 +360,7 @@ PHP_FUNCTION(assert_options)
360360
if (ac == 2) {
361361
zend_string *key = zend_string_init("assert.exception", sizeof("assert.exception")-1, 0);
362362
zend_string *val = zval_get_string(value);
363-
zend_alter_ini_entry_ex(key, val, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0 TSRMLS_CC);
363+
zend_alter_ini_entry_ex(key, val, PHP_INI_USER, PHP_INI_STAGE_RUNTIME, 0);
364364
zend_string_release(val);
365365
zend_string_release(key);
366366
}

ext/standard/dns.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ PHP_FUNCTION(gethostbynamel)
247247

248248
if(hostname_len > MAXFQDNLEN) {
249249
/* name too long, protect from CVE-2015-0235 */
250-
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Host name is too long, the limit is %d characters", MAXFQDNLEN);
250+
php_error_docref(NULL, E_WARNING, "Host name is too long, the limit is %d characters", MAXFQDNLEN);
251251
RETURN_FALSE;
252252
}
253253

main/streams/memory.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ static size_t php_stream_temp_write(php_stream *stream, const char *buf, size_t
376376
if (memsize + count >= ts->smax) {
377377
php_stream *file = php_stream_fopen_temporary_file(ts->tmpdir, "php", NULL);
378378
if (file == NULL) {
379-
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create temporary file, Check permissions in temporary files directory.");
379+
php_error_docref(NULL, E_WARNING, "Unable to create temporary file, Check permissions in temporary files directory.");
380380
return 0;
381381
}
382382
php_stream_write(file, membuf, memsize);

0 commit comments

Comments
 (0)