mirror of
https://github.com/php/php-src.git
synced 2025-08-20 01:14:28 +02:00
- Use ALLOC_HASHTABLE() instead of emalloc(sizeof(HashTable))
This commit is contained in:
parent
e4f109b69f
commit
c977f29862
11 changed files with 17 additions and 17 deletions
|
@ -1184,7 +1184,7 @@ PHPAPI pval php_COM_get_property_handler(zend_property_reference *property_refer
|
|||
|
||||
return_value.type = IS_OBJECT;
|
||||
return_value.value.obj.ce = &com_class_entry;
|
||||
return_value.value.obj.properties = (HashTable *) emalloc(sizeof(HashTable));
|
||||
ALLOC_HASHTABLE(return_value.value.obj.properties);
|
||||
zend_hash_init(return_value.value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
|
||||
ALLOC_ZVAL(handle);
|
||||
|
@ -1225,7 +1225,7 @@ PHPAPI pval php_COM_get_property_handler(zend_property_reference *property_refer
|
|||
|
||||
return_value.type = IS_OBJECT;
|
||||
return_value.value.obj.ce = &com_class_entry;
|
||||
return_value.value.obj.properties = (HashTable *) emalloc(sizeof(HashTable));
|
||||
ALLOC_HASHTABLE(return_value.value.obj.properties);
|
||||
zend_hash_init(return_value.value.obj.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
|
||||
|
||||
ALLOC_ZVAL(handle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue