cvs: php4 /ext/standard array.c

From: Date: Sun, 18 Jun 2000 03:43:58 +0000
Subject: cvs: php4 /ext/standard array.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-348@lists.php.net to get a copy of this message
andrei Sat Jun 17 20:43:58 2000 EDT Modified files: /php4/ext/standard array.c Log: @- Modified in_array() to not touch array pointer. (Andrei) Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.55 php4/ext/standard/array.c:1.56 --- php4/ext/standard/array.c:1.55 Sat Jun 17 09:49:03 2000 +++ php4/ext/standard/array.c Sat Jun 17 20:43:58 2000 @@ -1034,6 +1034,7 @@ **entry, /* pointer to array entry */ res; /* comparison result */ HashTable *target_hash; /* array hashtable */ + HashPosition pos; /* hash iterator */ int (*compare_func)(zval *, zval *, zval *) = is_equal_function; if (ZEND_NUM_ARGS() < 2 || ZEND_NUM_ARGS() > 3 || @@ -1058,14 +1059,14 @@ } target_hash = HASH_OF(*array); - zend_hash_internal_pointer_reset(target_hash); + zend_hash_internal_pointer_reset_ex(target_hash, &pos); while(zend_hash_get_current_data(target_hash, (void **)&entry) == SUCCESS) { compare_func(&res, *value, *entry); if (Z_LVAL(res) == 1) { RETURN_TRUE; } - zend_hash_move_forward(target_hash); + zend_hash_move_forward_ex(target_hash, &pos); } RETURN_FALSE;

« previous php.cvs (#348) next »