cvs: ZendEngine2 / zend_execute_API.c

From: Date: Tue, 10 Sep 2002 08:35:51 +0000
Subject: cvs: ZendEngine2 / zend_execute_API.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-416@lists.php.net to get a copy of this message
stas Tue Sep 10 04:35:51 2002 EDT Modified files: /ZendEngine2 zend_execute_API.c Log: MFZE1 Index: ZendEngine2/zend_execute_API.c diff -u ZendEngine2/zend_execute_API.c:1.172 ZendEngine2/zend_execute_API.c:1.173 --- ZendEngine2/zend_execute_API.c:1.172 Wed Aug 28 11:05:15 2002 +++ ZendEngine2/zend_execute_API.c Tue Sep 10 04:35:50 2002 @@ -415,6 +415,16 @@ zend_hash_move_forward(p->value.ht); continue; } + + if(const_value.type == IS_STRING && + const_value.value.str.len == str_index_len-1 && + !strncmp(const_value.value.str.val, str_index, str_index_len)) { + /* constant value is the same as its name */ + zval_dtor(&const_value); + zend_hash_move_forward(p->value.ht); + continue; + } + switch (const_value.type) { case IS_STRING: zend_hash_update(p->value.ht, const_value.value.str.val, const_value.value.str.len+1, element, sizeof(zval *), NULL); @@ -426,6 +436,7 @@ break; } zend_hash_del(p->value.ht, str_index, str_index_len); + zval_dtor(&const_value); } zend_hash_apply_with_argument(p->value.ht, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC); }

« previous php.zend-engine.cvs (#416) next »