diff options
author | Zeev Suraski <zeev@php.net> | 1999-11-21 18:11:10 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 1999-11-21 18:11:10 +0000 |
commit | 6358c6631b278ffbb733a5d1eabd6f4101712509 (patch) | |
tree | e01ccb7c1762ab482241e32b290974b6b417afa2 /Zend/zend_execute_API.c | |
parent | 5cc10ecec231640ea903992c9c84aa110441a211 (diff) | |
download | php-git-6358c6631b278ffbb733a5d1eabd6f4101712509.tar.gz |
- Optimize class instanciation
- Fix constant instanciation for array elements inside objects
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r-- | Zend/zend_execute_API.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 19b8e4b6ed..43ce0868bd 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -260,8 +260,10 @@ ZEND_API int zend_is_true(zval *op) } -ZEND_API void zval_update_constant(zval *p) +ZEND_API int zval_update_constant(zval **pp) { + zval *p = *pp; + if (p->type == IS_CONSTANT) { zval c; int refcount = p->refcount; @@ -277,7 +279,10 @@ ZEND_API void zval_update_constant(zval *p) } INIT_PZVAL(p); p->refcount = refcount; + } else if (p->type == IS_ARRAY) { + zend_hash_apply(p->value.ht, (int (*)(void *)) zval_update_constant); } + return 0; } |