diff options
author | Anatol Belski <ab@php.net> | 2014-10-15 09:37:55 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-10-15 09:37:55 +0200 |
commit | c00424e427930a33e6d8645cc3f23fb78ed29b9f (patch) | |
tree | 83190e6ac9d0714fc971fe0925a0d935414de91c /ext/standard | |
parent | 382f95e6127d52b079d172ccd017cf306402e015 (diff) | |
download | php-git-c00424e427930a33e6d8645cc3f23fb78ed29b9f.tar.gz |
bring back all the TSRMLS_FETCH() stuff
for better comparability with the mainstream
Diffstat (limited to 'ext/standard')
-rw-r--r-- | ext/standard/basic_functions.c | 3 | ||||
-rw-r--r-- | ext/standard/exec.c | 4 | ||||
-rw-r--r-- | ext/standard/incomplete_class.c | 3 | ||||
-rw-r--r-- | ext/standard/info.c | 3 | ||||
-rw-r--r-- | ext/standard/math.c | 8 | ||||
-rw-r--r-- | ext/standard/scanf.c | 1 | ||||
-rw-r--r-- | ext/standard/string.c | 1 |
7 files changed, 21 insertions, 2 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 147ea0a767..5bcd3d3386 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -4927,6 +4927,8 @@ static void user_tick_function_call(user_tick_function_entry *tick_fe TSRMLS_DC) static void run_user_tick_functions(int tick_count) /* {{{ */ { + TSRMLS_FETCH(); + zend_llist_apply(BG(user_tick_functions), (llist_apply_func_t) user_tick_function_call TSRMLS_CC); } /* }}} */ @@ -4936,6 +4938,7 @@ static int user_tick_function_compare(user_tick_function_entry * tick_fe1, user_ zval *func1 = &tick_fe1->arguments[0]; zval *func2 = &tick_fe2->arguments[0]; int ret; + TSRMLS_FETCH(); if (Z_TYPE_P(func1) == IS_STRING && Z_TYPE_P(func2) == IS_STRING) { ret = (zend_binary_zval_strcmp(func1, func2) == 0); diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 37bdefbb6b..28f01b338f 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -245,6 +245,8 @@ PHPAPI zend_string *php_escape_shell_cmd(char *str) size_t estimate = (2 * l) + 1; zend_string *cmd; + TSRMLS_FETCH(); + cmd = zend_string_alloc(2 * l, 0); for (x = 0, y = 0; x < l; x++) { @@ -335,6 +337,8 @@ PHPAPI zend_string *php_escape_shell_arg(char *str) zend_string *cmd; size_t estimate = (4 * l) + 3; + TSRMLS_FETCH(); + cmd = zend_string_alloc(4 * l + 2, 0); /* worst case */ #ifdef PHP_WIN32 diff --git a/ext/standard/incomplete_class.c b/ext/standard/incomplete_class.c index 02da0c11b7..011407da29 100644 --- a/ext/standard/incomplete_class.c +++ b/ext/standard/incomplete_class.c @@ -136,6 +136,7 @@ PHPAPI zend_string *php_lookup_class_name(zval *object) { zval *val; HashTable *object_properties; + TSRMLS_FETCH(); object_properties = Z_OBJPROP_P(object); @@ -152,6 +153,8 @@ PHPAPI zend_string *php_lookup_class_name(zval *object) PHPAPI void php_store_class_name(zval *object, const char *name, uint32_t len) { zval val; + TSRMLS_FETCH(); + ZVAL_STRINGL(&val, name, len); zend_hash_str_update(Z_OBJPROP_P(object), MAGIC_MEMBER, sizeof(MAGIC_MEMBER)-1, &val); diff --git a/ext/standard/info.c b/ext/standard/info.c index beec7749ca..bc0ddddcc0 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -65,6 +65,7 @@ static int php_info_print_html_esc(const char *str, int len) /* {{{ */ { int written; zend_string *new_str; + TSRMLS_FETCH(); new_str = php_escape_html_entities((unsigned char *) str, len, 0, ENT_QUOTES, "utf-8" TSRMLS_CC); written = php_output_write(new_str->val, new_str->len TSRMLS_CC); @@ -78,6 +79,7 @@ static int php_info_printf(const char *fmt, ...) /* {{{ */ char *buf; int len, written; va_list argv; + TSRMLS_FETCH(); va_start(argv, fmt); len = vspprintf(&buf, 0, fmt, argv); @@ -91,6 +93,7 @@ static int php_info_printf(const char *fmt, ...) /* {{{ */ static int php_info_print(const char *str) /* {{{ */ { + TSRMLS_FETCH(); return php_output_write(str, strlen(str) TSRMLS_CC); } /* }}} */ diff --git a/ext/standard/math.c b/ext/standard/math.c index ee06936369..7014e6c938 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -972,8 +972,12 @@ PHPAPI zend_long _php_math_basetolong(zval *arg, int base) if (num > onum) continue; - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number '%s' is too big to fit in long", s); - return ZEND_LONG_MAX; + { + TSRMLS_FETCH(); + + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number '%s' is too big to fit in long", s); + return ZEND_LONG_MAX; + } } return num; diff --git a/ext/standard/scanf.c b/ext/standard/scanf.c index 3a6ec012a1..62437831bb 100644 --- a/ext/standard/scanf.c +++ b/ext/standard/scanf.c @@ -316,6 +316,7 @@ PHPAPI int ValidateFormat(char *format, int numVars, int *totalSubs) int staticAssign[STATIC_LIST_SIZE]; int *nassign = staticAssign; int objIndex, xpgSize, nspace = STATIC_LIST_SIZE; + TSRMLS_FETCH(); /* * Initialize an array that records the number of times a variable diff --git a/ext/standard/string.c b/ext/standard/string.c index 1975f19b3f..706a3eb075 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -3228,6 +3228,7 @@ char *php_strerror(int errnum) { extern int sys_nerr; extern char *sys_errlist[]; + TSRMLS_FETCH(); if ((unsigned int) errnum < sys_nerr) { return(sys_errlist[errnum]); |