diff options
Diffstat (limited to 'ext/standard/array.c')
-rw-r--r-- | ext/standard/array.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c index 5e5062868..426af5dc6 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -2,12 +2,12 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2005 The PHP Group | + | Copyright (c) 1997-2006 The PHP Group | +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, | + | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_0.txt. | + | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: array.c,v 1.308.2.12 2005/10/30 13:48:30 iliaa Exp $ */ +/* $Id: array.c,v 1.308.2.16 2006/01/01 12:50:14 sniper Exp $ */ #include "php.h" #include "php_ini.h" @@ -355,15 +355,15 @@ static int array_data_compare(const void *a, const void *b TSRMLS_DC) { Bucket *f; Bucket *s; - pval result; - pval *first; - pval *second; + zval result; + zval *first; + zval *second; f = *((Bucket **) a); s = *((Bucket **) b); - first = *((pval **) f->pData); - second = *((pval **) s->pData); + first = *((zval **) f->pData); + second = *((zval **) s->pData); if (ARRAYG(compare_func)(&result, first, second TSRMLS_CC) == FAILURE) { return 0; @@ -405,8 +405,8 @@ static int array_natural_general_compare(const void *a, const void *b, int fold_ f = *((Bucket **) a); s = *((Bucket **) b); - fval = *((pval **) f->pData); - sval = *((pval **) s->pData); + fval = *((zval **) f->pData); + sval = *((zval **) s->pData); first = *fval; second = *sval; if (Z_TYPE_P(fval) != IS_STRING) { @@ -711,9 +711,9 @@ static int array_user_key_compare(const void *a, const void *b TSRMLS_DC) { Bucket *f; Bucket *s; - pval key1, key2; - pval *args[2]; - pval retval; + zval key1, key2; + zval *args[2]; + zval retval; int status; args[0] = &key1; @@ -794,7 +794,7 @@ PHP_FUNCTION(uksort) Advances array argument's internal pointer to the last element and return it */ PHP_FUNCTION(end) { - pval **array, **entry; + zval **array, **entry; HashTable *target_hash; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) { @@ -821,7 +821,7 @@ PHP_FUNCTION(end) Move array argument's internal pointer to the previous element and return it */ PHP_FUNCTION(prev) { - pval **array, **entry; + zval **array, **entry; HashTable *target_hash; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) { @@ -848,7 +848,7 @@ PHP_FUNCTION(prev) Move array argument's internal pointer to the next element and return it */ PHP_FUNCTION(next) { - pval **array, **entry; + zval **array, **entry; HashTable *target_hash; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) { @@ -875,7 +875,7 @@ PHP_FUNCTION(next) Set array argument's internal pointer to the first element and return it */ PHP_FUNCTION(reset) { - pval **array, **entry; + zval **array, **entry; HashTable *target_hash; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) { @@ -902,7 +902,7 @@ PHP_FUNCTION(reset) Return the element currently pointed to by the internal array pointer */ PHP_FUNCTION(current) { - pval **array, **entry; + zval **array, **entry; HashTable *target_hash; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &array) == FAILURE) { @@ -924,7 +924,7 @@ PHP_FUNCTION(current) Return the key of the element currently pointed to by the internal array pointer */ PHP_FUNCTION(key) { - pval **array; + zval **array; char *string_key; uint string_length; ulong num_key; @@ -956,7 +956,7 @@ PHP_FUNCTION(key) PHP_FUNCTION(min) { int argc=ZEND_NUM_ARGS(); - pval **result; + zval **result; if (argc<=0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Atleast one value should be passed"); @@ -964,7 +964,7 @@ PHP_FUNCTION(min) } set_compare_func(SORT_REGULAR TSRMLS_CC); if (argc == 1) { - pval **arr; + zval **arr; if (zend_get_parameters_ex(1, &arr) == FAILURE || Z_TYPE_PP(arr) != IS_ARRAY) { WRONG_PARAM_COUNT; @@ -976,8 +976,8 @@ PHP_FUNCTION(min) RETURN_FALSE; } } else { - pval ***args = (pval ***) safe_emalloc(sizeof(pval **), ZEND_NUM_ARGS(), 0); - pval **min, result; + zval ***args = (zval ***) safe_emalloc(sizeof(zval **), ZEND_NUM_ARGS(), 0); + zval **min, result; int i; if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args)==FAILURE) { @@ -1006,7 +1006,7 @@ PHP_FUNCTION(min) PHP_FUNCTION(max) { int argc=ZEND_NUM_ARGS(); - pval **result; + zval **result; if (argc<=0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Atleast one value should be passed"); @@ -1014,7 +1014,7 @@ PHP_FUNCTION(max) } set_compare_func(SORT_REGULAR TSRMLS_CC); if (argc == 1) { - pval **arr; + zval **arr; if (zend_get_parameters_ex(1, &arr) == FAILURE || Z_TYPE_PP(arr) != IS_ARRAY) { WRONG_PARAM_COUNT; @@ -1026,8 +1026,8 @@ PHP_FUNCTION(max) RETURN_FALSE; } } else { - pval ***args = (pval ***) safe_emalloc(sizeof(pval **), ZEND_NUM_ARGS(), 0); - pval **max, result; + zval ***args = (zval ***) safe_emalloc(sizeof(zval **), ZEND_NUM_ARGS(), 0); + zval **max, result; int i; if (zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) { @@ -4347,7 +4347,7 @@ PHP_FUNCTION(array_map) fci.params = ¶ms[1]; fci.no_separation = 0; - if (!zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && result) { + if (zend_call_function(&fci, &fci_cache TSRMLS_CC) != SUCCESS || !result) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "An error occurred while invoking the map callback"); efree(array_len); efree(args); |