diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2017-12-28 12:25:01 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2017-12-28 12:25:01 +0100 |
commit | 3538cbe6c03172c069862f3fdd345c990a734d7a (patch) | |
tree | 7490cf499c8f294e4f243c3b6b04eda01eb3e19c /ext | |
parent | bee5bc78ed4c195feb034983def68be0e1d93048 (diff) | |
download | php-git-3538cbe6c03172c069862f3fdd345c990a734d7a.tar.gz |
Use free_obj for intl ResourceBundle
Partial fix for bug #67911, the part about __destruct() not being
called.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/intl/resourcebundle/resourcebundle_class.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/intl/resourcebundle/resourcebundle_class.c b/ext/intl/resourcebundle/resourcebundle_class.c index 7cd6d2be09..6d5825a9b7 100644 --- a/ext/intl/resourcebundle/resourcebundle_class.c +++ b/ext/intl/resourcebundle/resourcebundle_class.c @@ -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; |