Skip to content

Commit 6e6018f

Browse files
committed
Apply suggestions
1 parent d2f8fcc commit 6e6018f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Zend/tests/gh19543-002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
GH-19543 001: GC treats ZEND_WEAKREF_TAG_MAP references as WeakMap references
2+
GH-19543 002: GC treats ZEND_WEAKREF_TAG_MAP references as WeakMap references
33
--FILE--
44
<?php
55

ext/zend_test/test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,7 +1311,7 @@ PHP_MSHUTDOWN_FUNCTION(zend_test)
13111311

13121312
PHP_RINIT_FUNCTION(zend_test)
13131313
{
1314-
ZT_G(global_weakmap) = emalloc(sizeof(HashTable));
1314+
ALLOC_HASHTABLE(ZT_G(global_weakmap));
13151315
zend_hash_init(ZT_G(global_weakmap), 8, NULL, ZVAL_PTR_DTOR, 0);
13161316
ZT_G(observer_nesting_depth) = 0;
13171317
return SUCCESS;
@@ -1324,7 +1324,7 @@ PHP_RSHUTDOWN_FUNCTION(zend_test)
13241324
zend_weakrefs_hash_del(ZT_G(global_weakmap), zend_weakref_key_to_object(obj_key));
13251325
} ZEND_HASH_FOREACH_END();
13261326
zend_hash_destroy(ZT_G(global_weakmap));
1327-
efree(ZT_G(global_weakmap));
1327+
FREE_HASHTABLE(ZT_G(global_weakmap));
13281328

13291329
if (ZT_G(zend_test_heap)) {
13301330
free(ZT_G(zend_test_heap));

0 commit comments

Comments
 (0)