mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Use free_obj for intl ResourceBundle
Partial fix for bug #67911, the part about __destruct() not being called.
This commit is contained in:
parent
bee5bc78ed
commit
3538cbe6c0
@ -35,8 +35,8 @@ zend_class_entry *ResourceBundle_ce_ptr = NULL;
|
||||
|
||||
static zend_object_handlers ResourceBundle_object_handlers;
|
||||
|
||||
/* {{{ ResourceBundle_object_dtor */
|
||||
static void ResourceBundle_object_destroy( zend_object *object )
|
||||
/* {{{ ResourceBundle_object_free */
|
||||
static void ResourceBundle_object_free( zend_object *object )
|
||||
{
|
||||
ResourceBundle_object *rb = php_intl_resourcebundle_fetch_object(object);
|
||||
|
||||
@ -49,6 +49,8 @@ static void ResourceBundle_object_destroy( zend_object *object )
|
||||
if (rb->child) {
|
||||
ures_close( rb->child );
|
||||
}
|
||||
|
||||
zend_object_std_dtor( &rb->zend );
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@ -449,7 +451,7 @@ void resourcebundle_register_class( void )
|
||||
ResourceBundle_object_handlers = std_object_handlers;
|
||||
ResourceBundle_object_handlers.offset = XtOffsetOf(ResourceBundle_object, zend);
|
||||
ResourceBundle_object_handlers.clone_obj = NULL; /* ICU ResourceBundle has no clone implementation */
|
||||
ResourceBundle_object_handlers.dtor_obj = ResourceBundle_object_destroy;
|
||||
ResourceBundle_object_handlers.free_obj = ResourceBundle_object_free;
|
||||
ResourceBundle_object_handlers.read_dimension = resourcebundle_array_get;
|
||||
ResourceBundle_object_handlers.count_elements = resourcebundle_array_count;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user