diff options
author | Dmitry Stogov <dmitry@zend.com> | 2018-07-06 12:07:13 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2018-07-06 12:07:13 +0300 |
commit | bd8e76761f0cfc4dcfd714a2b22f95d993abb84f (patch) | |
tree | addffac61a32d0745be594883bde3853a04ebb9e | |
parent | 6a4e1e8b8e5b99dad6d81b28f8b9d20e5db5e5d9 (diff) | |
download | php-git-bd8e76761f0cfc4dcfd714a2b22f95d993abb84f.tar.gz |
Use zval_ptr_dtor() instead of zval_dtor() in in-place array/object conversion functions
-rw-r--r-- | Zend/zend_operators.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 0b1951f2c0..ddd3a5af77 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -371,7 +371,7 @@ try_again: zval dst; convert_object_to_type(op, &dst, IS_LONG, convert_to_long); - zval_dtor(op); + zval_ptr_dtor(op); if (Z_TYPE(dst) == IS_LONG) { ZVAL_LONG(op, Z_LVAL(dst)); @@ -430,7 +430,7 @@ try_again: zval dst; convert_object_to_type(op, &dst, IS_DOUBLE, convert_to_double); - zval_dtor(op); + zval_ptr_dtor(op); if (Z_TYPE(dst) == IS_DOUBLE) { ZVAL_DOUBLE(op, Z_DVAL(dst)); @@ -502,7 +502,7 @@ try_again: zval dst; convert_object_to_type(op, &dst, _IS_BOOL, convert_to_boolean); - zval_dtor(op); + zval_ptr_dtor(op); if (Z_TYPE_INFO(dst) == IS_FALSE || Z_TYPE_INFO(dst) == IS_TRUE) { Z_TYPE_INFO_P(op) = Z_TYPE_INFO(dst); @@ -576,7 +576,7 @@ try_again: zval dst; convert_object_to_type(op, &dst, IS_STRING, convert_to_string); - zval_dtor(op); + zval_ptr_dtor(op); if (Z_TYPE(dst) == IS_STRING) { ZVAL_COPY_VALUE(op, &dst); @@ -620,7 +620,7 @@ try_again: (Z_OBJCE_P(op)->default_properties_count || Z_OBJ_P(op)->handlers != &std_object_handlers || GC_IS_RECURSIVE(obj_ht))); - zval_dtor(op); + zval_ptr_dtor(op); ZVAL_ARR(op, obj_ht); return; } @@ -629,13 +629,13 @@ try_again: convert_object_to_type(op, &dst, IS_ARRAY, convert_to_array); if (Z_TYPE(dst) == IS_ARRAY) { - zval_dtor(op); + zval_ptr_dtor(op); ZVAL_COPY_VALUE(op, &dst); return; } } - zval_dtor(op); + zval_ptr_dtor(op); /*ZVAL_EMPTY_ARRAY(op);*/ array_init(op); } @@ -667,7 +667,7 @@ try_again: /* TODO: try not to duplicate immutable arrays as well ??? */ ht = zend_array_dup(ht); } else if (ht != Z_ARR_P(op)) { - zval_dtor(op); + zval_ptr_dtor(op); } else { GC_DELREF(ht); } |