diff options
author | Yasuo Ohgaki <yohgaki@php.net> | 2002-03-12 06:56:57 +0000 |
---|---|---|
committer | Yasuo Ohgaki <yohgaki@php.net> | 2002-03-12 06:56:57 +0000 |
commit | e953dba0d73e1ec6aa5d2fc97f343eb7eb6ca5bb (patch) | |
tree | a4dbfb22fc5035e7ce68639eb00a50a806da248d | |
parent | 7f8b2a653325e806f97725e704dcfda9e84ce25a (diff) | |
download | php-git-e953dba0d73e1ec6aa5d2fc97f343eb7eb6ca5bb.tar.gz |
Make use of TSRMLS_C/D
-rw-r--r-- | ext/standard/array.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c index 106ea8d23f..7cc5044434 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -233,14 +233,12 @@ PHP_FUNCTION(ksort) /* }}} */ -int php_count_recursive(zval *array, long mode) +static int php_count_recursive(zval *array, long mode TSRMLS_DC) { long cnt = 0; zval **element; HashTable *target_hash; - TSRMLS_FETCH(); - target_hash = HASH_OF(array); if (Z_TYPE_P(array) == IS_ARRAY) @@ -252,7 +250,7 @@ int php_count_recursive(zval *array, long mode) for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(array), &pos); zend_hash_get_current_data_ex(Z_ARRVAL_P(array), (void **) &element, &pos) == SUCCESS; zend_hash_move_forward_ex(Z_ARRVAL_P(array), &pos)) { - cnt += php_count_recursive(*element, COUNT_RECURSIVE); + cnt += php_count_recursive(*element, COUNT_RECURSIVE TSRMLS_CC); } } } @@ -275,7 +273,7 @@ PHP_FUNCTION(count) RETURN_LONG(0); break; case IS_ARRAY: - RETURN_LONG (php_count_recursive (array, mode)); + RETURN_LONG (php_count_recursive (array, mode) TSRMLS_CC); break; default: RETURN_LONG(1); |