return zend_array_dup(Z_ARRVAL(retval));
} else if (Z_REFCOUNT(retval) <= 1) {
*is_temp = 1;
- ALLOC_HASHTABLE(ht);
- *ht = *Z_ARRVAL(retval);
- efree_size(Z_ARR(retval), sizeof(zend_array));
+ ht = Z_ARR(retval);
return ht;
} else {
*is_temp = 0;
object_and_properties_init(return_value, ce, NULL);
if (!ce->default_properties_count && !ce->__set) {
- ALLOC_HASHTABLE(Z_OBJ_P(return_value)->properties);
- *Z_OBJ_P(return_value)->properties = *Z_ARRVAL(dataset);
- efree(Z_ARR(dataset));
+ Z_OBJ_P(return_value)->properties = Z_ARR(dataset);
} else {
zend_merge_properties(return_value, Z_ARRVAL(dataset));
zval_ptr_dtor(&dataset);
ZVAL_COPY_VALUE(&dataset, return_value);
object_and_properties_init(return_value, ce, NULL);
if (!ce->default_properties_count && !ce->__set) {
- ALLOC_HASHTABLE(Z_OBJ_P(return_value)->properties);
- *Z_OBJ_P(return_value)->properties = *Z_ARRVAL(dataset);
- efree(Z_ARR(dataset));
+ Z_OBJ_P(return_value)->properties = Z_ARR(dataset);
} else {
zend_merge_properties(return_value, Z_ARRVAL(dataset));
zval_ptr_dtor(&dataset);