helly Mon Nov 1 16:06:42 2004 EDT
Modified files:
/php-src/ext/standard array.c
Log:
- Add some comment
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.280&r2=1.281&ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.280 php-src/ext/standard/array.c:1.281
--- php-src/ext/standard/array.c:1.280 Mon Nov 1 15:57:22 2004
+++ php-src/ext/standard/array.c Mon Nov 1 16:06:42 2004
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.280 2004/11/01 20:57:22 helly Exp $ */
+/* $Id: array.c,v 1.281 2004/11/01 21:06:42 helly Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -326,6 +326,7 @@
break;
case IS_OBJECT: {
#if HAVE_SPL
+ /* it the object implements Countable we call its count()
method */
zval *retval;
if (instanceof_function(Z_OBJCE_P(array), spl_ce_Countable
TSRMLS_CC)) {
@@ -335,6 +336,7 @@
return;
}
#endif
+ /* if not we return the number of properties (not taking
visibility into account) */
if (Z_OBJ_HT(*array)->count_elements) {
RETVAL_LONG(1);
if (SUCCESS == Z_OBJ_HT(*array)->count_elements(array,
&Z_LVAL_P(return_value) TSRMLS_CC)) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php