diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2004-02-06 03:07:59 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2004-02-06 03:07:59 +0000 |
commit | 1eb6a182898cb0011d35cbf9b66755cfc93edaa5 (patch) | |
tree | f1029e2720606af9c17ba903b510744573780b83 | |
parent | f6b9419d2cdf3cbfe2d6cfabe8112fa054b260d5 (diff) | |
download | php-git-1eb6a182898cb0011d35cbf9b66755cfc93edaa5.tar.gz |
Do not initialize & create vars unless they will be used.
-rwxr-xr-x | ext/spl/spl_functions.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/spl/spl_functions.c b/ext/spl/spl_functions.c index bc867b1230..820866ccd5 100755 --- a/ext/spl/spl_functions.c +++ b/ext/spl/spl_functions.c @@ -106,10 +106,10 @@ void spl_register_property( zend_class_entry * class_entry, char *prop_name, zva /* {{{ 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); |