mirror of
https://github.com/php/php-src.git
synced 2024-11-28 20:34:29 +08:00
dtor's may not be called from free_storage handlers
This commit is contained in:
parent
ac9f4cc2af
commit
ce984d7667
@ -54,7 +54,7 @@ ZEND_API void zend_register_iterator_wrapper(TSRMLS_D)
|
||||
zend_iterator_class_entry.name = "__iterator_wrapper";
|
||||
}
|
||||
|
||||
static void iter_wrapper_free_storage(zend_object *object TSRMLS_DC)
|
||||
static void iter_wrapper_dtor(void *object, zend_object_handle handle TSRMLS_DC)
|
||||
{
|
||||
zend_object_iterator *iter = (zend_object_iterator*)object;
|
||||
iter->funcs->dtor(iter TSRMLS_CC);
|
||||
@ -66,7 +66,7 @@ ZEND_API zval *zend_iterator_wrap(zend_object_iterator *iter TSRMLS_DC)
|
||||
|
||||
MAKE_STD_ZVAL(wrapped);
|
||||
Z_TYPE_P(wrapped) = IS_OBJECT;
|
||||
wrapped->value.obj.handle = zend_objects_store_put(iter, NULL, iter_wrapper_free_storage, NULL TSRMLS_CC);
|
||||
wrapped->value.obj.handle = zend_objects_store_put(iter, iter_wrapper_dtor, NULL, NULL TSRMLS_CC);
|
||||
wrapped->value.obj.handlers = &iterator_object_handlers;
|
||||
|
||||
return wrapped;
|
||||
|
Loading…
Reference in New Issue
Block a user