cvs: php-src /ext/spl spl_array.c
| From: | Marcus Boerger | Date: | Tue, 31 Aug 2004 20:54:00 +0000 |
| Subject: | cvs: php-src /ext/spl spl_array.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-28532@lists.php.net to get a copy of this message | ||
helly Tue Aug 31 16:54:00 2004 EDT
Modified files:
/php-src/ext/spl spl_array.c
Log:
Fix seeking
http://cvs.php.net/diff.php/php-src/ext/spl/spl_array.c?r1=1.49&r2=1.50&ty=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.49 php-src/ext/spl/spl_array.c:1.50
--- php-src/ext/spl/spl_array.c:1.49 Mon Jun 21 15:15:27 2004
+++ php-src/ext/spl/spl_array.c Tue Aug 31 16:54:00 2004
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_array.c,v 1.49 2004/06/21 19:15:27 helly Exp $ */
+/* $Id: spl_array.c,v 1.50 2004/08/31 20:54:00 helly Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -716,7 +716,7 @@
zend_hash_internal_pointer_reset_ex(aht, &intern->pos);
- while (position-- > 0 && spl_array_next(intern TSRMLS_CC));
+ while (position-- > 0 && spl_array_next(intern TSRMLS_CC) == SUCCESS);
} /* }}} */
int spl_array_object_count_elements(zval *object, long *count TSRMLS_DC) /* {{{ */
@@ -737,9 +737,8 @@
pos = intern->pos;
*count = 0;
zend_hash_internal_pointer_reset_ex(aht, &intern->pos);
- while(intern->pos) {
+ while(intern->pos && spl_array_next(intern TSRMLS_CC) == SUCCESS) {
(*count)++;
- spl_array_next(intern TSRMLS_CC);
}
intern->pos = pos;
return SUCCESS;