mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Beef up debug macros
This commit is contained in:
parent
023cb6474b
commit
cda27ae9ac
4 changed files with 77 additions and 73 deletions
|
@ -117,7 +117,7 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
|
|||
return SUCCESS;
|
||||
}
|
||||
}
|
||||
zvalue->value.str.val = (char *) estrndup(zvalue->value.str.val, zvalue->value.str.len);
|
||||
zvalue->value.str.val = (char *) estrndup_rel(zvalue->value.str.val, zvalue->value.str.len);
|
||||
break;
|
||||
case IS_ARRAY: {
|
||||
zval *tmp;
|
||||
|
@ -128,7 +128,7 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
|
|||
var_reset(zvalue);
|
||||
return FAILURE;
|
||||
}
|
||||
zvalue->value.ht = (HashTable *) emalloc(sizeof(HashTable));
|
||||
zvalue->value.ht = (HashTable *) emalloc_rel(sizeof(HashTable));
|
||||
zend_hash_init(zvalue->value.ht, 0, NULL, PVAL_PTR_DTOR, 0);
|
||||
zend_hash_copy(zvalue->value.ht, original_ht, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *));
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
|
|||
zval *tmp;
|
||||
HashTable *original_ht = zvalue->value.obj.properties;
|
||||
|
||||
zvalue->value.obj.properties = (HashTable *) emalloc(sizeof(HashTable));
|
||||
zvalue->value.obj.properties = (HashTable *) emalloc_rel(sizeof(HashTable));
|
||||
zend_hash_init(zvalue->value.obj.properties, 0, NULL, PVAL_PTR_DTOR, 0);
|
||||
zend_hash_copy(zvalue->value.obj.properties, original_ht, (void (*)(void *)) zval_add_ref, (void *) &tmp, sizeof(zval *));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue