From 42c4bcaed12fcfc2451838e615e584a1d61a5228 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 14 Jul 2014 14:25:04 +0400 Subject: [PATCH] Fixed ZTS build --- Zend/zend_API.c | 2 +- Zend/zend_API.h | 56 ++++++++++++------------ Zend/zend_compile.c | 18 ++++---- ext/intl/collator/collator_sort.c | 4 +- ext/intl/dateformat/dateformat.c | 4 +- ext/intl/msgformat/msgformat_helpers.cpp | 2 +- ext/soap/php_encoding.c | 2 +- ext/soap/soap.c | 2 +- 8 files changed, 45 insertions(+), 45 deletions(-) diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 5770b9b030..5baa26ea54 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -352,7 +352,7 @@ ZEND_API void zend_wrong_callback_error(int severity, int num, char *error TSRML } /* }}} */ -ZEND_API int _z_param_class(zval *arg, zend_class_entry **pce, int num, int check_null TSRMLS_CC) /* {{{ */ +ZEND_API int _z_param_class(zval *arg, zend_class_entry **pce, int num, int check_null TSRMLS_DC) /* {{{ */ { zend_class_entry *ce_base = *pce; diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 9278224c72..3a242c249e 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -714,7 +714,7 @@ ZEND_API void zend_wrong_paramers_count_error(int num_args, int min_num_args, in ZEND_API void zend_wrong_paramer_type_error(int num, zend_expected_type expected_type, zval *arg TSRMLS_DC); ZEND_API void zend_wrong_paramer_class_error(int num, char *name, zval *arg TSRMLS_DC); ZEND_API void zend_wrong_callback_error(int severity, int num, char *error TSRMLS_DC); -ZEND_API int _z_param_class(zval *arg, zend_class_entry **pce, int num, int check_null TSRMLS_CC); +ZEND_API int _z_param_class(zval *arg, zend_class_entry **pce, int num, int check_null TSRMLS_DC); #define ZEND_PARSE_PARAMETERS_START_EX(flags, min_num_args, max_num_args) do { \ const int _flags = (flags); \ @@ -736,7 +736,7 @@ ZEND_API int _z_param_class(zval *arg, zend_class_entry **pce, int num, int chec (UNEXPECTED(_num_args > _max_num_args) && \ EXPECTED(_max_num_args >= 0))) { \ if (!(_flags & ZEND_PARSE_PARAMS_QUIET)) { \ - zend_wrong_paramers_count_error(_num_args, _min_num_args, _max_num_args); \ + zend_wrong_paramers_count_error(_num_args, _min_num_args, _max_num_args TSRMLS_CC); \ } \ goto zend_parse_params_failure; \ } \ @@ -750,17 +750,17 @@ ZEND_API int _z_param_class(zval *arg, zend_class_entry **pce, int num, int chec if (0) { \ zend_parse_params_wrong_callback: ZEND_ATTRIBUTE_UNUSED_LABEL \ if (!(_flags & ZEND_PARSE_PARAMS_QUIET)) { \ - zend_wrong_callback_error(E_WARNING, _i, _error TSRMLS_DC); \ + zend_wrong_callback_error(E_WARNING, _i, _error TSRMLS_CC); \ } \ goto zend_parse_params_failure; \ zend_parse_params_wrong_class: ZEND_ATTRIBUTE_UNUSED_LABEL \ if (!(_flags & ZEND_PARSE_PARAMS_QUIET)) { \ - zend_wrong_paramer_class_error(_i, _error, _arg TSRMLS_DC); \ + zend_wrong_paramer_class_error(_i, _error, _arg TSRMLS_CC); \ } \ goto zend_parse_params_failure; \ zend_parse_params_wrong_arg: ZEND_ATTRIBUTE_UNUSED_LABEL \ if (!(_flags & ZEND_PARSE_PARAMS_QUIET)) { \ - zend_wrong_paramer_type_error(_i, _expected_type, _arg TSRMLS_DC); \ + zend_wrong_paramer_type_error(_i, _expected_type, _arg TSRMLS_CC); \ } \ zend_parse_params_failure: ZEND_ATTRIBUTE_UNUSED_LABEL \ failure; \ @@ -809,7 +809,7 @@ zend_parse_params_failure: ZEND_ATTRIBUTE_UNUSED_LABEL \ /* old "b" */ #define Z_PARAM_BOOL_EX(dest, is_null, check_null, separate) do { \ Z_PARAM_PROLOGUE(separate); \ - if (!_z_param_bool(_arg, &dest, &is_null, check_null)) { \ + if (!_z_param_bool(_arg, &dest, &is_null, check_null TSRMLS_CC)) { \ _expected_type = Z_EXPECTED_BOOL; \ goto zend_parse_params_wrong_arg; \ } \ @@ -844,7 +844,7 @@ zend_parse_params_failure: ZEND_ATTRIBUTE_UNUSED_LABEL \ /* old "f" */ #define Z_PARAM_FUNC_EX(dest_fci, dest_fcc, check_null, separate) do { \ Z_PARAM_PROLOGUE(separate); \ - if (!_z_param_func(_arg, &dest_fci, &dest_fcc, check_null, &_error)) { \ + if (!_z_param_func(_arg, &dest_fci, &dest_fcc, check_null, &_error TSRMLS_CC)) { \ if (!_error) { \ _expected_type = Z_EXPECTED_FUNC; \ goto zend_parse_params_wrong_arg; \ @@ -852,7 +852,7 @@ zend_parse_params_failure: ZEND_ATTRIBUTE_UNUSED_LABEL \ goto zend_parse_params_wrong_callback; \ } \ } else if (_error) { \ - zend_wrong_callback_error(E_STRICT, _i, _error TSRMLS_DC); \ + zend_wrong_callback_error(E_STRICT, _i, _error TSRMLS_CC); \ } \ } while (0); @@ -862,7 +862,7 @@ zend_parse_params_failure: ZEND_ATTRIBUTE_UNUSED_LABEL \ /* old "h" */ #define Z_PARAM_ARRAY_HT_EX(dest, check_null, separate) do { \ Z_PARAM_PROLOGUE(separate); \ - if (!_z_param_array_ht(_arg, &dest, check_null, 0)) { \ + if (!_z_param_array_ht(_arg, &dest, check_null, 0 TSRMLS_CC)) { \ _expected_type = Z_EXPECTED_ARRAY; \ goto zend_parse_params_wrong_arg; \ } \ @@ -874,7 +874,7 @@ zend_parse_params_failure: ZEND_ATTRIBUTE_UNUSED_LABEL \ /* old "H" */ #define Z_PARAM_ARRAY_OR_OBJECT_HT_EX(dest, check_null, separate) do { \ Z_PARAM_PROLOGUE(separate); \ - if (!_z_param_array_ht(_arg, &dest, check_null, 1)) { \ + if (!_z_param_array_ht(_arg, &dest, check_null, 1 TSRMLS_CC)) { \ _expected_type = Z_EXPECTED_ARRAY; \ goto zend_parse_params_wrong_arg; \ } \ @@ -910,7 +910,7 @@ zend_parse_params_failure: ZEND_ATTRIBUTE_UNUSED_LABEL \ /* old "o" */ #define Z_PARAM_OBJECT_EX(dest, check_null, separate) do { \ Z_PARAM_PROLOGUE(separate); \ - if (!_z_param_object(_arg, &dest, NULL, check_null)) { \ + if (!_z_param_object(_arg, &dest, NULL, check_null TSRMLS_CC)) { \ _expected_type = Z_EXPECTED_OBJECT; \ goto zend_parse_params_wrong_arg; \ } \ @@ -922,7 +922,7 @@ zend_parse_params_failure: ZEND_ATTRIBUTE_UNUSED_LABEL \ /* old "O" */ #define Z_PARAM_OBJECT_OF_CLASS_EX(dest, _ce, check_null, separate) do { \ Z_PARAM_PROLOGUE(separate); \ - if (!_z_param_object(_arg, &dest, _ce, check_null)) { \ + if (!_z_param_object(_arg, &dest, _ce, check_null TSRMLS_CC)) { \ if (_ce) { \ _error = (_ce)->name->val; \ goto zend_parse_params_wrong_class; \ @@ -939,7 +939,7 @@ zend_parse_params_failure: ZEND_ATTRIBUTE_UNUSED_LABEL \ /* old "p" */ #define Z_PARAM_PATH_EX(dest, dest_len, check_null, separate) do { \ Z_PARAM_PROLOGUE(separate); \ - if (!_z_param_path(_arg, &dest, &dest_len, check_null)) { \ + if (!_z_param_path(_arg, &dest, &dest_len, check_null TSRMLS_CC)) { \ _expected_type = Z_EXPECTED_PATH; \ goto zend_parse_params_wrong_arg; \ } \ @@ -951,7 +951,7 @@ zend_parse_params_failure: ZEND_ATTRIBUTE_UNUSED_LABEL \ /* old "P" */ #define Z_PARAM_PATH_STR_EX(dest, check_null, separate) do { \ Z_PARAM_PROLOGUE(separate); \ - if (!_z_param_path_str(_arg, &dest, check_null)) { \ + if (!_z_param_path_str(_arg, &dest, check_null TSRMLS_CC)) { \ _expected_type = Z_EXPECTED_PATH; \ goto zend_parse_params_wrong_arg; \ } \ @@ -975,7 +975,7 @@ zend_parse_params_failure: ZEND_ATTRIBUTE_UNUSED_LABEL \ /* old "s" */ #define Z_PARAM_STRING_EX(dest, dest_len, check_null, separate) do { \ Z_PARAM_PROLOGUE(separate); \ - if (!_z_param_string(_arg, &dest, &dest_len, check_null)) { \ + if (!_z_param_string(_arg, &dest, &dest_len, check_null TSRMLS_CC)) { \ _expected_type = Z_EXPECTED_STRING; \ goto zend_parse_params_wrong_arg; \ } \ @@ -987,7 +987,7 @@ zend_parse_params_failure: ZEND_ATTRIBUTE_UNUSED_LABEL \ /* old "S" */ #define Z_PARAM_STR_EX(dest, check_null, separate) do { \ Z_PARAM_PROLOGUE(separate); \ - if (!_z_param_str(_arg, &dest, check_null)) { \ + if (!_z_param_str(_arg, &dest, check_null TSRMLS_CC)) { \ _expected_type = Z_EXPECTED_STRING; \ goto zend_parse_params_wrong_arg; \ } \ @@ -1039,7 +1039,7 @@ zend_parse_params_failure: ZEND_ATTRIBUTE_UNUSED_LABEL \ /* Private part of new parameter parsing API */ -static zend_always_inline int _z_param_bool(zval *arg, zend_bool *dest, zend_bool *is_null, int check_null) +static zend_always_inline int _z_param_bool(zval *arg, zend_bool *dest, zend_bool *is_null, int check_null TSRMLS_DC) { if (check_null) { *is_null = 0; @@ -1052,7 +1052,7 @@ static zend_always_inline int _z_param_bool(zval *arg, zend_bool *dest, zend_boo } *dest = 0; } else if (EXPECTED(Z_TYPE_P(arg) <= IS_STRING)) { - *dest = zend_is_true(arg); + *dest = zend_is_true(arg TSRMLS_CC); } else { return 0; } @@ -1137,7 +1137,7 @@ static zend_always_inline int _z_param_double(zval *arg, double *dest, zend_bool return 1; } -static zend_always_inline int _z_param_str(zval *arg, zend_string **dest, int check_null) +static zend_always_inline int _z_param_str(zval *arg, zend_string **dest, int check_null TSRMLS_DC) { if (EXPECTED(Z_TYPE_P(arg) == IS_STRING)) { *dest = Z_STR_P(arg); @@ -1159,11 +1159,11 @@ static zend_always_inline int _z_param_str(zval *arg, zend_string **dest, int ch return 1; } -static zend_always_inline int _z_param_string(zval *arg, char **dest, int *dest_len, int check_null) +static zend_always_inline int _z_param_string(zval *arg, char **dest, int *dest_len, int check_null TSRMLS_DC) { zend_string *str; - if (!_z_param_str(arg, &str, check_null)) { + if (!_z_param_str(arg, &str, check_null TSRMLS_CC)) { return 0; } if (check_null && UNEXPECTED(!str)) { @@ -1176,9 +1176,9 @@ static zend_always_inline int _z_param_string(zval *arg, char **dest, int *dest_ return 1; } -static zend_always_inline int _z_param_path_str(zval *arg, zend_string **dest, int check_null) +static zend_always_inline int _z_param_path_str(zval *arg, zend_string **dest, int check_null TSRMLS_DC) { - if (!_z_param_str(arg, dest, check_null) || + if (!_z_param_str(arg, dest, check_null TSRMLS_CC) || (check_null && UNEXPECTED(!(*dest)->val)) || UNEXPECTED(CHECK_NULL_PATH((*dest)->val, (*dest)->len))) { return 0; @@ -1186,11 +1186,11 @@ static zend_always_inline int _z_param_path_str(zval *arg, zend_string **dest, i return 1; } -static zend_always_inline int _z_param_path(zval *arg, char **dest, int *dest_len, int check_null) +static zend_always_inline int _z_param_path(zval *arg, char **dest, int *dest_len, int check_null TSRMLS_DC) { zend_string *str; - if (!_z_param_path_str(arg, &str, check_null)) { + if (!_z_param_path_str(arg, &str, check_null TSRMLS_CC)) { return 0; } if (check_null && UNEXPECTED(!str)) { @@ -1216,7 +1216,7 @@ static zend_always_inline int _z_param_array(zval *arg, zval **dest, int check_n return 1; } -static zend_always_inline int _z_param_array_ht(zval *arg, HashTable **dest, int check_null, int or_object) +static zend_always_inline int _z_param_array_ht(zval *arg, HashTable **dest, int check_null, int or_object TSRMLS_DC) { if (EXPECTED(Z_TYPE_P(arg) == IS_ARRAY)) { *dest = Z_ARRVAL_P(arg); @@ -1230,7 +1230,7 @@ static zend_always_inline int _z_param_array_ht(zval *arg, HashTable **dest, int return 1; } -static zend_always_inline int _z_param_object(zval *arg, zval **dest, zend_class_entry *ce, int check_null) +static zend_always_inline int _z_param_object(zval *arg, zval **dest, zend_class_entry *ce, int check_null TSRMLS_DC) { if (EXPECTED(Z_TYPE_P(arg) == IS_OBJECT) && (!ce || EXPECTED(instanceof_function(Z_OBJCE_P(arg), ce TSRMLS_CC) != 0))) { @@ -1255,7 +1255,7 @@ static zend_always_inline int _z_param_resource(zval *arg, zval **dest, int chec return 1; } -static zend_always_inline int _z_param_func(zval *arg, zend_fcall_info *dest_fci, zend_fcall_info_cache *dest_fcc, int check_null, char **error) +static zend_always_inline int _z_param_func(zval *arg, zend_fcall_info *dest_fci, zend_fcall_info_cache *dest_fcc, int check_null, char **error TSRMLS_DC) { if (check_null && UNEXPECTED(Z_TYPE_P(arg) == IS_NULL)) { dest_fci->size = 0; diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 90d36b19dc..2350047af5 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -2539,7 +2539,7 @@ int zend_do_begin_class_member_function_call(znode *class_name, znode *method_na } /* }}} */ -static int zend_do_convert_call(zend_op *init_opline, zend_op *opline, long num_args, zend_function **func_ptr TSRMLS_CC) /* {{{ */ +static int zend_do_convert_call(zend_op *init_opline, zend_op *opline, long num_args, zend_function **func_ptr TSRMLS_DC) /* {{{ */ { zval *function_name; zend_string *lcname; @@ -2848,7 +2848,7 @@ void zend_do_end_function_call(znode *function_name, znode *result, int is_metho } else if (func->common.function_name->len == sizeof("is_null")-1 && memcmp(func->common.function_name->val, "is_null", sizeof("is_null")-1) == 0) { if (fcall->arg_num == 1) { - if (zend_do_convert_type_check(opline, result, IS_NULL)) { + if (zend_do_convert_type_check(opline, result, IS_NULL TSRMLS_CC)) { zend_stack_del_top(&CG(function_call_stack)); return; } @@ -2856,7 +2856,7 @@ void zend_do_end_function_call(znode *function_name, znode *result, int is_metho } else if (func->common.function_name->len == sizeof("is_bool")-1 && memcmp(func->common.function_name->val, "is_bool", sizeof("is_bool")-1) == 0) { if (fcall->arg_num == 1) { - if (zend_do_convert_type_check(opline, result, _IS_BOOL)) { + if (zend_do_convert_type_check(opline, result, _IS_BOOL TSRMLS_CC)) { zend_stack_del_top(&CG(function_call_stack)); return; } @@ -2864,7 +2864,7 @@ void zend_do_end_function_call(znode *function_name, znode *result, int is_metho } else if (func->common.function_name->len == sizeof("is_long")-1 && memcmp(func->common.function_name->val, "is_long", sizeof("is_long")-1) == 0) { if (fcall->arg_num == 1) { - if (zend_do_convert_type_check(opline, result, IS_LONG)) { + if (zend_do_convert_type_check(opline, result, IS_LONG TSRMLS_CC)) { zend_stack_del_top(&CG(function_call_stack)); return; } @@ -2872,7 +2872,7 @@ void zend_do_end_function_call(znode *function_name, znode *result, int is_metho } else if (func->common.function_name->len == sizeof("is_float")-1 && memcmp(func->common.function_name->val, "is_float", sizeof("is_float")-1) == 0) { if (fcall->arg_num == 1) { - if (zend_do_convert_type_check(opline, result, IS_DOUBLE)) { + if (zend_do_convert_type_check(opline, result, IS_DOUBLE TSRMLS_CC)) { zend_stack_del_top(&CG(function_call_stack)); return; } @@ -2880,7 +2880,7 @@ void zend_do_end_function_call(znode *function_name, znode *result, int is_metho } else if (func->common.function_name->len == sizeof("is_string")-1 && memcmp(func->common.function_name->val, "is_string", sizeof("is_string")-1) == 0) { if (fcall->arg_num == 1) { - if (zend_do_convert_type_check(opline, result, IS_STRING)) { + if (zend_do_convert_type_check(opline, result, IS_STRING TSRMLS_CC)) { zend_stack_del_top(&CG(function_call_stack)); return; } @@ -2888,7 +2888,7 @@ void zend_do_end_function_call(znode *function_name, znode *result, int is_metho } else if (func->common.function_name->len == sizeof("is_array")-1 && memcmp(func->common.function_name->val, "is_array", sizeof("is_array")-1) == 0) { if (fcall->arg_num == 1) { - if (zend_do_convert_type_check(opline, result, IS_ARRAY)) { + if (zend_do_convert_type_check(opline, result, IS_ARRAY TSRMLS_CC)) { zend_stack_del_top(&CG(function_call_stack)); return; } @@ -2896,7 +2896,7 @@ void zend_do_end_function_call(znode *function_name, znode *result, int is_metho } else if (func->common.function_name->len == sizeof("is_object")-1 && memcmp(func->common.function_name->val, "is_object", sizeof("is_object")-1) == 0) { if (fcall->arg_num == 1) { - if (zend_do_convert_type_check(opline, result, IS_OBJECT)) { + if (zend_do_convert_type_check(opline, result, IS_OBJECT TSRMLS_CC)) { zend_stack_del_top(&CG(function_call_stack)); return; } @@ -2904,7 +2904,7 @@ void zend_do_end_function_call(znode *function_name, znode *result, int is_metho } else if (func->common.function_name->len == sizeof("is_resouce")-1 && memcmp(func->common.function_name->val, "is_resource", sizeof("is_resource")-1) == 0) { if (fcall->arg_num == 1) { - if (zend_do_convert_type_check(opline, result, IS_RESOURCE)) { + if (zend_do_convert_type_check(opline, result, IS_RESOURCE TSRMLS_CC)) { zend_stack_del_top(&CG(function_call_stack)); return; } diff --git a/ext/intl/collator/collator_sort.c b/ext/intl/collator/collator_sort.c index b40839b456..8bf5449e14 100644 --- a/ext/intl/collator/collator_sort.c +++ b/ext/intl/collator/collator_sort.c @@ -69,7 +69,7 @@ static int collator_regular_compare_function(zval *result, zval *op1, zval *op2 str2_p == ( num2_p = collator_convert_string_to_number_if_possible( str2_p, &num2 ) ) ) ) { /* Fetch collator object. */ - co = Z_INTL_COLLATOR_P(&INTL_G(current_collator) TSRMLS_CC ); + co = Z_INTL_COLLATOR_P(&INTL_G(current_collator)); if (!co || !co->ucoll) { intl_error_set_code( NULL, COLLATOR_ERROR_CODE( co ) TSRMLS_CC ); @@ -187,7 +187,7 @@ static int collator_icu_compare_function(zval *result, zval *op1, zval *op2 TSRM str2_p = collator_make_printable_zval( op2, &str2 ); /* Fetch collator object. */ - co = Z_INTL_COLLATOR_P(&INTL_G(current_collator) TSRMLS_CC ); + co = Z_INTL_COLLATOR_P(&INTL_G(current_collator)); /* Compare the strings using ICU. */ ZVAL_LONG(result, ucol_strcoll( diff --git a/ext/intl/dateformat/dateformat.c b/ext/intl/dateformat/dateformat.c index ef8fe13516..eedc60040e 100644 --- a/ext/intl/dateformat/dateformat.c +++ b/ext/intl/dateformat/dateformat.c @@ -82,7 +82,7 @@ PHP_FUNCTION( datefmt_get_error_code ) RETURN_FALSE; } - dfo = Z_INTL_DATEFORMATTER_P( object TSRMLS_CC ); + dfo = Z_INTL_DATEFORMATTER_P( object ); /* Return formatter's last error code. */ RETURN_LONG( INTL_DATA_ERROR_CODE(dfo) ); @@ -109,7 +109,7 @@ PHP_FUNCTION( datefmt_get_error_message ) RETURN_FALSE; } - dfo = Z_INTL_DATEFORMATTER_P( object TSRMLS_CC ); + dfo = Z_INTL_DATEFORMATTER_P( object ); /* Return last error message. */ message = intl_error_get_message( INTL_DATA_ERROR_P(dfo) TSRMLS_CC ); diff --git a/ext/intl/msgformat/msgformat_helpers.cpp b/ext/intl/msgformat/msgformat_helpers.cpp index 1c18c6c969..ba5a5df001 100644 --- a/ext/intl/msgformat/msgformat_helpers.cpp +++ b/ext/intl/msgformat/msgformat_helpers.cpp @@ -83,7 +83,7 @@ U_CFUNC int32_t umsg_format_arg_count(UMessageFormat *fmt) return fmt_count; } -static void arg_types_dtor(zval *el TSRMLS_DC) { +static void arg_types_dtor(zval *el) { efree(Z_PTR_P(el)); } diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 6712e91211..8aeab65a1b 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -2275,7 +2275,7 @@ static xmlNodePtr to_xml_array(encodeTypePtr type, zval *data, int style, xmlNod if (EG(exception)) { goto iterator_done; } - array_set_zval_key(Z_ARRVAL(array_copy), &key, val); + array_set_zval_key(Z_ARRVAL(array_copy), &key, val TSRMLS_CC); zval_ptr_dtor(val); zval_dtor(&key); } else { diff --git a/ext/soap/soap.c b/ext/soap/soap.c index d98d1fc494..4e5a2b35ea 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -627,7 +627,7 @@ static void delete_service_res(zend_resource *res TSRMLS_DC) delete_service(res->ptr); } -static void delete_hashtable_res(zend_resource *res TSRMLS_CC) +static void delete_hashtable_res(zend_resource *res TSRMLS_DC) { delete_hashtable(res->ptr); } -- 2.40.0