Skip to content

Commit 050e13c

Browse files
committed
Use free_obj handler in HashContext
Instead of dtor_obj.
1 parent 4c37645 commit 050e13c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ext/hash/hash.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,6 +1391,11 @@ static void php_hashcontext_dtor(zend_object *obj) {
13911391
}
13921392
/* }}} */
13931393

1394+
static void php_hashcontext_free(zend_object *obj) {
1395+
php_hashcontext_dtor(obj);
1396+
zend_object_std_dtor(obj);
1397+
}
1398+
13941399
/* {{{ php_hashcontext_clone */
13951400
static zend_object *php_hashcontext_clone(zend_object *zobj) {
13961401
php_hashcontext_object *oldobj = php_hashcontext_from_object(zobj);
@@ -1631,7 +1636,7 @@ PHP_MINIT_FUNCTION(hash)
16311636
memcpy(&php_hashcontext_handlers, &std_object_handlers,
16321637
sizeof(zend_object_handlers));
16331638
php_hashcontext_handlers.offset = XtOffsetOf(php_hashcontext_object, std);
1634-
php_hashcontext_handlers.dtor_obj = php_hashcontext_dtor;
1639+
php_hashcontext_handlers.free_obj = php_hashcontext_free;
16351640
php_hashcontext_handlers.clone_obj = php_hashcontext_clone;
16361641

16371642
#ifdef PHP_MHASH_BC

0 commit comments

Comments
 (0)