diff options
| author | Dmitry Stogov <dmitry@php.net> | 2006-12-25 14:16:27 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2006-12-25 14:16:27 +0000 |
| commit | e57a60698b754250ef18da78254593d907d7925c (patch) | |
| tree | fccf3909e9c12c727351c02b65add7f7da41f75b /Zend/zend_execute.c | |
| parent | 5436160dc625a256a1d9b5ab3e608039a4d96f20 (diff) | |
| download | php-git-e57a60698b754250ef18da78254593d907d7925c.tar.gz | |
Fixed bug #39944 (References broken)
Diffstat (limited to 'Zend/zend_execute.c')
| -rw-r--r-- | Zend/zend_execute.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 59594713ff..a15537dc4d 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -64,7 +64,7 @@ static void zend_extension_fcall_end_handler(zend_extension *extension, zend_op_ #define TEMP_VAR_STACK_LIMIT 2000 -static inline void zend_pzval_unlock_func(zval *z, zend_free_op *should_free) +static inline void zend_pzval_unlock_func(zval *z, zend_free_op *should_free, int unref) { if (!--z->refcount) { z->refcount = 1; @@ -73,7 +73,7 @@ static inline void zend_pzval_unlock_func(zval *z, zend_free_op *should_free) /* should_free->is_var = 1; */ } else { should_free->var = 0; - if (z->is_ref && z->refcount == 1) { + if (unref && z->is_ref && z->refcount == 1) { z->is_ref = 0; } } @@ -87,7 +87,8 @@ static inline void zend_pzval_unlock_free_func(zval *z) } } -#define PZVAL_UNLOCK(z, f) zend_pzval_unlock_func(z, f) +#define PZVAL_UNLOCK(z, f) zend_pzval_unlock_func(z, f, 1) +#define PZVAL_UNLOCK_EX(z, f, u) zend_pzval_unlock_func(z, f, u) #define PZVAL_UNLOCK_FREE(z) zend_pzval_unlock_free_func(z) #define PZVAL_LOCK(z) (z)->refcount++ #define RETURN_VALUE_UNUSED(pzn) (((pzn)->u.EA.type & EXT_TYPE_UNUSED)) |
