Skip to content

Commit 0e762b1

Browse files
committed
Properly convert obj_key to pointer in weakrefs zend_test
1 parent 5e14b51 commit 0e762b1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/zend_test/test.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,9 @@ PHP_RINIT_FUNCTION(zend_test)
509509

510510
PHP_RSHUTDOWN_FUNCTION(zend_test)
511511
{
512-
zend_ulong objptr;
513-
ZEND_HASH_FOREACH_NUM_KEY(&ZT_G(global_weakmap), objptr) {
514-
zend_weakrefs_hash_del(&ZT_G(global_weakmap), (zend_object *)(uintptr_t)objptr);
512+
zend_ulong obj_key;
513+
ZEND_HASH_FOREACH_NUM_KEY(&ZT_G(global_weakmap), obj_key) {
514+
zend_weakrefs_hash_del(&ZT_G(global_weakmap), zend_weakref_key_to_zend_object_ptr(obj_key));
515515
} ZEND_HASH_FOREACH_END();
516516
zend_hash_destroy(&ZT_G(global_weakmap));
517517
return SUCCESS;

0 commit comments

Comments
 (0)