diff options
Diffstat (limited to 'ext/standard')
-rw-r--r-- | ext/standard/array.c | 8 | ||||
-rw-r--r-- | ext/standard/assert.c | 12 | ||||
-rw-r--r-- | ext/standard/basic_functions.c | 17 | ||||
-rw-r--r-- | ext/standard/dir.c | 2 | ||||
-rw-r--r-- | ext/standard/dl.c | 6 | ||||
-rw-r--r-- | ext/standard/file.c | 11 | ||||
-rw-r--r-- | ext/standard/http_fopen_wrapper.c | 4 | ||||
-rw-r--r-- | ext/standard/info.c | 18 | ||||
-rw-r--r-- | ext/standard/lcg.c | 4 | ||||
-rw-r--r-- | ext/standard/reg.c | 6 | ||||
-rw-r--r-- | ext/standard/string.c | 4 | ||||
-rw-r--r-- | ext/standard/syslog.c | 2 | ||||
-rw-r--r-- | ext/standard/var.c | 6 |
13 files changed, 51 insertions, 49 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c index 4dd3b1fe14..199075b70e 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -68,7 +68,7 @@ php_array_globals array_globals; PHP_MINIT_FUNCTION(array) { #ifdef ZTS - array_globals_id = ts_allocate_id(sizeof(php_array_globals), NULL, NULL); + ts_allocate_id(&array_globals_id, sizeof(php_array_globals), NULL, NULL); #endif REGISTER_LONG_CONSTANT("EXTR_OVERWRITE", EXTR_OVERWRITE, CONST_CS | CONST_PERSISTENT); @@ -522,7 +522,7 @@ static int array_user_compare(const void *a, const void *b) Bucket *s; pval **args[2]; pval *retval_ptr; - ELS_FETCH(); + TSRMLS_FETCH(); BLS_FETCH(); f = *((Bucket **) a); @@ -610,7 +610,7 @@ static int array_user_key_compare(const void *a, const void *b) pval *args[2]; pval retval; int status; - ELS_FETCH(); + TSRMLS_FETCH(); BLS_FETCH(); args[0] = &key1; @@ -959,7 +959,7 @@ static int php_array_walk(HashTable *target_hash, zval **userdata) ulong num_key; HashPosition pos; BLS_FETCH(); - ELS_FETCH(); + TSRMLS_FETCH(); /* Allocate space for key */ MAKE_STD_ZVAL(key); diff --git a/ext/standard/assert.c b/ext/standard/assert.c index 8b1a9c3aa6..1fc1684011 100644 --- a/ext/standard/assert.c +++ b/ext/standard/assert.c @@ -86,7 +86,7 @@ PHP_INI_BEGIN() STD_PHP_INI_ENTRY("assert.quiet_eval", "0", PHP_INI_ALL, OnUpdateInt, quiet_eval, php_assert_globals, assert_globals) PHP_INI_END() -static void php_assert_init_globals(ASSERTLS_D) +static void php_assert_init_globals(ASSERTLS_D TSRMLS_DC) { ASSERT(callback) = NULL; } @@ -95,9 +95,9 @@ PHP_MINIT_FUNCTION(assert) { #ifdef ZTS - assert_globals_id = ts_allocate_id(sizeof(php_assert_globals), (ts_allocate_ctor) php_assert_init_globals, NULL); + ts_allocate_id(&assert_globals_id, sizeof(php_assert_globals), (ts_allocate_ctor) php_assert_init_globals, NULL); #else - php_assert_init_globals(ASSERTLS_C); + php_assert_init_globals(ASSERTLS_C TSRMLS_CC); #endif REGISTER_INI_ENTRIES(); @@ -173,7 +173,7 @@ PHP_FUNCTION(assert) } compiled_string_description = zend_make_compiled_string_description("assert code"); - if (zend_eval_string(myeval, &retval, compiled_string_description CLS_CC ELS_CC) == FAILURE) { + if (zend_eval_string(myeval, &retval, compiled_string_description CLS_CC TSRMLS_CC) == FAILURE) { efree(compiled_string_description); zend_error(E_ERROR, "Failure evaluating code:\n%s\n", myeval); /* zend_error() does not return in this case. */ @@ -199,8 +199,8 @@ PHP_FUNCTION(assert) zval *args[4]; zval *retval; int i; - uint lineno = zend_get_executed_lineno(ELS_C); - char *filename = zend_get_executed_filename(ELS_C); + uint lineno = zend_get_executed_lineno(TSRMLS_C); + char *filename = zend_get_executed_filename(TSRMLS_C); MAKE_STD_ZVAL(args[0]); MAKE_STD_ZVAL(args[1]); diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 80467d8fcd..da7588ecdb 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -691,7 +691,7 @@ static void php_putenv_destructor(putenv_entry *pe) void test_class_startup(void); -static void basic_globals_ctor(BLS_D) +static void basic_globals_ctor(BLS_D TSRMLS_DC) { BG(next) = NULL; BG(left) = -1; @@ -709,7 +709,7 @@ static void basic_globals_ctor(BLS_D) #endif } -static void basic_globals_dtor(BLS_D) +static void basic_globals_dtor(BLS_D TSRMLS_DC) { zend_hash_destroy(&BG(sm_protected_env_vars)); if (BG(sm_allowed_env_vars)) { @@ -726,9 +726,9 @@ PHP_MINIT_FUNCTION(basic) PLS_FETCH(); #ifdef ZTS - basic_globals_id = ts_allocate_id(sizeof(php_basic_globals), (ts_allocate_ctor) basic_globals_ctor, (ts_allocate_dtor) basic_globals_dtor); + ts_allocate_id(&basic_globals_id, sizeof(php_basic_globals), (ts_allocate_ctor) basic_globals_ctor, (ts_allocate_dtor) basic_globals_dtor); #else - basic_globals_ctor(BLS_C); + basic_globals_ctor(BLS_C TSRMLS_CC); #endif REGISTER_LONG_CONSTANT("CONNECTION_ABORTED", PHP_CONNECTION_ABORTED, CONST_CS | CONST_PERSISTENT); @@ -804,8 +804,9 @@ PHP_MSHUTDOWN_FUNCTION(basic) { PLS_FETCH(); BLS_FETCH(); + TSRMLS_FETCH(); - basic_globals_dtor(BLS_C); + basic_globals_dtor(BLS_C TSRMLS_CC); #ifdef ZTS ts_free_id(basic_globals_id); @@ -1824,7 +1825,7 @@ void user_tick_function_dtor(user_tick_function_entry *tick_function_entry) static int user_shutdown_function_call(php_shutdown_function_entry *shutdown_function_entry) { zval retval; - ELS_FETCH(); + TSRMLS_FETCH(); if (call_user_function(EG(function_table), NULL, shutdown_function_entry->arguments[0], &retval, shutdown_function_entry->arg_count-1, shutdown_function_entry->arguments+1)==SUCCESS) { zval_dtor(&retval); @@ -1839,7 +1840,7 @@ static void user_tick_function_call(user_tick_function_entry *tick_fe) { zval retval; zval *function = tick_fe->arguments[0]; - ELS_FETCH(); + TSRMLS_FETCH(); if (call_user_function(EG(function_table), NULL, function, &retval, tick_fe->arg_count - 1, tick_fe->arguments + 1) == SUCCESS) { @@ -1888,7 +1889,7 @@ static int user_tick_function_compare(user_tick_function_entry *tick_fe1, void php_call_shutdown_functions(void) { BLS_FETCH(); - ELS_FETCH(); + TSRMLS_FETCH(); if (BG(user_shutdown_function_names)) zend_try { zend_hash_apply(BG(user_shutdown_function_names), (apply_func_t)user_shutdown_function_call); diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 927bf958d7..b64893b8d1 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -137,7 +137,7 @@ PHP_MINIT_FUNCTION(dir) dir_class_entry_ptr = zend_register_internal_class(&dir_class_entry); #ifdef ZTS - dir_globals_id = ts_allocate_id(sizeof(php_dir_globals), NULL, NULL); + ts_allocate_id(&dir_globals_id, sizeof(php_dir_globals), NULL, NULL); #endif tmpstr[0] = DEFAULT_SLASH; tmpstr[1] = '\0'; diff --git a/ext/standard/dl.c b/ext/standard/dl.c index 439fb889c7..e911f74a80 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -102,7 +102,7 @@ void php_dl(pval *file, int type, pval *return_value) int error_type; char *extension_dir; PLS_FETCH(); - ELS_FETCH(); + TSRMLS_FETCH(); if (type==MODULE_PERSISTENT) { @@ -177,7 +177,7 @@ void php_dl(pval *file, int type, pval *return_value) module_entry->type = type; module_entry->module_number = zend_next_free_module(); if (module_entry->module_startup_func) { - if (module_entry->module_startup_func(type, module_entry->module_number ELS_CC)==FAILURE) { + if (module_entry->module_startup_func(type, module_entry->module_number TSRMLS_CC)==FAILURE) { php_error(error_type, "%s: Unable to initialize module", module_entry->name); DL_UNLOAD(handle); RETURN_FALSE; @@ -186,7 +186,7 @@ void php_dl(pval *file, int type, pval *return_value) zend_register_module(module_entry); if ((type == MODULE_TEMPORARY) && module_entry->request_startup_func) { - if (module_entry->request_startup_func(type, module_entry->module_number ELS_CC)) { + if (module_entry->request_startup_func(type, module_entry->module_number TSRMLS_CC)) { php_error(error_type, "%s: Unable to initialize module", module_entry->name); DL_UNLOAD(handle); RETURN_FALSE; diff --git a/ext/standard/file.c b/ext/standard/file.c index 3261e06425..4fa6eccf92 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -168,7 +168,7 @@ PHPAPI int php_file_le_socket(void) /* XXX doe we really want this???? */ } -static void file_globals_ctor(FLS_D) +static void file_globals_ctor(FLS_D TSRMLS_DC) { zend_hash_init(&FG(ht_fsock_keys), 0, NULL, NULL, 1); zend_hash_init(&FG(ht_fsock_socks), 0, NULL, (void (*)(void *))php_msock_destroy, 1); @@ -179,7 +179,7 @@ static void file_globals_ctor(FLS_D) } -static void file_globals_dtor(FLS_D) +static void file_globals_dtor(FLS_D TSRMLS_DC) { zend_hash_destroy(&FG(ht_fsock_socks)); zend_hash_destroy(&FG(ht_fsock_keys)); @@ -198,9 +198,9 @@ PHP_MINIT_FUNCTION(file) #endif #ifdef ZTS - file_globals_id = ts_allocate_id(sizeof(php_file_globals), (ts_allocate_ctor) file_globals_ctor, (ts_allocate_dtor) file_globals_dtor); + ts_allocate_id(&file_globals_id, sizeof(php_file_globals), (ts_allocate_ctor) file_globals_ctor, (ts_allocate_dtor) file_globals_dtor); #else - file_globals_ctor(FLS_C); + file_globals_ctor(FLS_C TSRMLS_CC); #endif REGISTER_LONG_CONSTANT("SEEK_SET", SEEK_SET, CONST_CS | CONST_PERSISTENT); @@ -220,8 +220,9 @@ PHP_MSHUTDOWN_FUNCTION(file) { #ifndef ZTS FLS_FETCH(); + TSRMLS_FETCH(); - file_globals_dtor(FLS_C); + file_globals_dtor(FLS_C TSRMLS_CC); #endif return SUCCESS; } diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 41fadce931..9c09c78dcd 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -274,7 +274,7 @@ FILE *php_fopen_url_wrap_http(char *path, char *mode, int options, int *issock, php_url_free(resource); if (location[0] != '\0') { zval **response_header_new, *entry, **entryp; - ELS_FETCH(); + TSRMLS_FETCH(); fp = php_fopen_url_wrap_http(location, mode, options, issock, socketd, opened_path); if (zend_hash_find(EG(active_symbol_table), "http_response_header", sizeof("http_response_header"), (void **) &response_header_new) == SUCCESS) { @@ -299,7 +299,7 @@ FILE *php_fopen_url_wrap_http(char *path, char *mode, int options, int *issock, *issock = 1; out: { - ELS_FETCH(); + TSRMLS_FETCH(); ZEND_SET_SYMBOL(EG(active_symbol_table), "http_response_header", response_header); } return (fp); diff --git a/ext/standard/info.c b/ext/standard/info.c index 8f911d2f68..dec141f331 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -58,7 +58,7 @@ static int _display_module_info(zend_module_entry *module, void *arg) /* {{{ php_print_gpcse_array */ -static void php_print_gpcse_array(char *name, uint name_length ELS_DC) +static void php_print_gpcse_array(char *name, uint name_length TSRMLS_DC) { zval **data, **tmp, tmp2; char *string_key; @@ -152,7 +152,7 @@ PHPAPI void php_print_info(int flag) int expose_php = INI_INT("expose_php"); time_t the_time; struct tm *ta, tmbuf; - ELS_FETCH(); + TSRMLS_FETCH(); SLS_FETCH(); the_time = time(NULL); @@ -244,7 +244,7 @@ PHPAPI void php_print_info(int flag) PUTS("</a></h1>\n"); } - zend_ini_sort_entries(ELS_C); + zend_ini_sort_entries(TSRMLS_C); if (flag & PHP_INFO_CONFIGURATION) { php_info_print_hr(); @@ -303,12 +303,12 @@ PHPAPI void php_print_info(int flag) if (zend_hash_find(&EG(symbol_table), "PHP_AUTH_PW", sizeof("PHP_AUTH_PW"), (void **) &data) != FAILURE) { php_info_print_table_row(2, "PHP_AUTH_PW", (*data)->value.str.val); } - php_print_gpcse_array("HTTP_GET_VARS", sizeof("HTTP_GET_VARS")-1 ELS_CC); - php_print_gpcse_array("HTTP_POST_VARS", sizeof("HTTP_POST_VARS")-1 ELS_CC); - php_print_gpcse_array("HTTP_POST_FILES", sizeof("HTTP_POST_FILES")-1 ELS_CC); - php_print_gpcse_array("HTTP_COOKIE_VARS", sizeof("HTTP_COOKIE_VARS")-1 ELS_CC); - php_print_gpcse_array("HTTP_SERVER_VARS", sizeof("HTTP_SERVER_VARS")-1 ELS_CC); - php_print_gpcse_array("HTTP_ENV_VARS", sizeof("HTTP_ENV_VARS")-1 ELS_CC); + php_print_gpcse_array("HTTP_GET_VARS", sizeof("HTTP_GET_VARS")-1 TSRMLS_CC); + php_print_gpcse_array("HTTP_POST_VARS", sizeof("HTTP_POST_VARS")-1 TSRMLS_CC); + php_print_gpcse_array("HTTP_POST_FILES", sizeof("HTTP_POST_FILES")-1 TSRMLS_CC); + php_print_gpcse_array("HTTP_COOKIE_VARS", sizeof("HTTP_COOKIE_VARS")-1 TSRMLS_CC); + php_print_gpcse_array("HTTP_SERVER_VARS", sizeof("HTTP_SERVER_VARS")-1 TSRMLS_CC); + php_print_gpcse_array("HTTP_ENV_VARS", sizeof("HTTP_ENV_VARS")-1 TSRMLS_CC); php_info_print_table_end(); } diff --git a/ext/standard/lcg.c b/ext/standard/lcg.c index 51447252ba..6f97a0397a 100644 --- a/ext/standard/lcg.c +++ b/ext/standard/lcg.c @@ -63,7 +63,7 @@ double php_combined_lcg(void) return z * 4.656613e-10; } -static void lcg_init_globals(LCGLS_D) +static void lcg_init_globals(LCGLS_D TSRMLS_DC) { LCG(s1) = 1; #ifdef ZTS @@ -76,7 +76,7 @@ static void lcg_init_globals(LCGLS_D) #ifdef ZTS PHP_MINIT_FUNCTION(lcg) { - lcg_globals_id = ts_allocate_id(sizeof(php_lcg_globals), (ts_allocate_ctor) lcg_init_globals, NULL); + ts_allocate_id(&lcg_globals_id, sizeof(php_lcg_globals), (ts_allocate_ctor) lcg_init_globals, NULL); return SUCCESS; } #else diff --git a/ext/standard/reg.c b/ext/standard/reg.c index bcd0111b8a..c962f2b8c4 100644 --- a/ext/standard/reg.c +++ b/ext/standard/reg.c @@ -84,7 +84,7 @@ static void _free_reg_cache(reg_cache *rc) #undef regcomp #define regcomp(a,b,c) _php_regcomp(a,b,c) -static void php_reg_init_globals(php_reg_globals *reg_globals) +static void php_reg_init_globals(php_reg_globals *reg_globals TSRMLS_DC) { zend_hash_init(®_globals->ht_rc, 0, NULL, (void (*)(void *)) _free_reg_cache, 1); } @@ -92,9 +92,9 @@ static void php_reg_init_globals(php_reg_globals *reg_globals) PHP_MINIT_FUNCTION(regex) { #ifdef ZTS - reg_globals_id = ts_allocate_id(sizeof(php_reg_globals), (ts_allocate_ctor) php_reg_init_globals, NULL); + ts_allocate_id(®_globals_id, sizeof(php_reg_globals), (ts_allocate_ctor) php_reg_init_globals, NULL); #else - php_reg_init_globals(®_globals); + php_reg_init_globals(®_globals TSRMLS_CC); #endif return SUCCESS; diff --git a/ext/standard/string.c b/ext/standard/string.c index 04599f0ee7..3f82017d63 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2994,14 +2994,14 @@ PHP_FUNCTION(parse_str) old_rg = PG(register_globals); if(argCount == 1) { PG(register_globals) = 1; - php_treat_data(PARSE_STRING, res, NULL ELS_CC PLS_CC SLS_CC); + php_treat_data(PARSE_STRING, res, NULL TSRMLS_CC PLS_CC SLS_CC); } else { PG(register_globals) = 0; /* Clear out the array that was passed in. */ zval_dtor(*arrayArg); array_init(*arrayArg); - php_treat_data(PARSE_STRING, res, *arrayArg ELS_CC PLS_CC SLS_CC); + php_treat_data(PARSE_STRING, res, *arrayArg TSRMLS_CC PLS_CC SLS_CC); } PG(register_globals) = old_rg; } diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c index 236c54cf88..f6330facd3 100644 --- a/ext/standard/syslog.c +++ b/ext/standard/syslog.c @@ -130,7 +130,7 @@ PHP_RSHUTDOWN_FUNCTION(syslog) */ static void start_syslog(BLS_D) { - ELS_FETCH(); + TSRMLS_FETCH(); /* error levels */ SET_VAR_LONG("LOG_EMERG", LOG_EMERG); /* system unusable */ diff --git a/ext/standard/var.c b/ext/standard/var.c index a652d68e6e..48ddba407b 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -72,7 +72,7 @@ void php_var_dump(zval **struc, int level) php_printf("%sint(%ld)\n", COMMON, Z_LVAL_PP(struc)); break; case IS_DOUBLE: { - ELS_FETCH(); + TSRMLS_FETCH(); php_printf("%sfloat(%.*G)\n", COMMON, (int) EG(precision), Z_DVAL_PP(struc)); } @@ -208,7 +208,7 @@ PHPAPI void php_var_serialize(zval *buf, zval **struc, HashTable *var_hash) return; case IS_DOUBLE: { - ELS_FETCH(); + TSRMLS_FETCH(); slen = sprintf(s, "d:%.*G;",(int) EG(precision), Z_DVAL_PP(struc)); STR_CAT(buf, s, slen); } @@ -366,7 +366,7 @@ PHPAPI int php_var_unserialize(zval **rval, const char **p, const char *max, Has HashTable *myht; zval **rval_ref; - ELS_FETCH(); + TSRMLS_FETCH(); BLS_FETCH(); if (var_hash && **p != 'R') { /* references aren't counted by serializer! */ |