Re: cvs: php-src /ext/spl spl_array.c

From: Date: Wed, 28 Apr 2004 22:19:50 +0000
Subject: Re: cvs: php-src /ext/spl spl_array.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-27214@lists.php.net to get a copy of this message
On Wed, Apr 28, 2004 at 09:45:41PM -0000, Marcus Boerger wrote: > +/* {{{ proto bool ArrayObject::count() > + Return the number of elements in the Iterator. */ > +SPL_METHOD(Array, count) > +{ > + long position; > + zval *object = getThis(); > + spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC); > + HashTable *aht = HASH_OF(intern->array); > + HashPosition pos; > + > + if (!aht) { > + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Array was modified outside object and is no > longer an array"); > + RETURN_LONG(0); > + } > + > + RETURN_LONG(zend_hash_num_elements(aht)); > +} /* }}} */ > + > /* {{{ proto mixed|NULL ArrayIterator::current() > Return current array entry */ > SPL_METHOD(Array, current) It looks like both 'long position' and 'HashPosition pos' are unused in this function. -- Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)

« previous php.cvs (#27214) next »