iliaa Thu Feb 5 22:08:00 2004 EDT
Modified files:
/php-src/ext/spl spl_functions.c
Log:
Do not initialize & create vars unless they will be used.
http://cvs.php.net/diff.php/php-src/ext/spl/spl_functions.c?r1=1.22&r2=1.23&ty=u
Index: php-src/ext/spl/spl_functions.c
diff -u php-src/ext/spl/spl_functions.c:1.22 php-src/ext/spl/spl_functions.c:1.23
--- php-src/ext/spl/spl_functions.c:1.22 Mon Jan 26 02:52:52 2004
+++ php-src/ext/spl/spl_functions.c Thu Feb 5 22:07:59 2004
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: spl_functions.c,v 1.22 2004/01/26 07:52:52 helly Exp $ */
+/* $Id: spl_functions.c,v 1.23 2004/02/06 03:07:59 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -106,10 +106,10 @@
/* {{{ spl_add_class_name */
void spl_add_class_name(zval *list, zend_class_entry * pce, int allow, int ce_flags
TSRMLS_DC)
{
- size_t len = strlen(pce->name);
- zval *tmp;
-
if (!allow || (allow > 0 && pce->ce_flags & ce_flags) || (allow < 0 &&
!(pce->ce_flags & ce_flags))) {
+ size_t len = strlen(pce->name);
+ zval *tmp;
+
if (zend_hash_find(Z_ARRVAL_P(list), pce->name, len+1, (void*)&tmp) ==
FAILURE) {
MAKE_STD_ZVAL(tmp);
ZVAL_STRING(tmp, pce->name, 1);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php