com php-src: Use free_obj for intl ResourceBundle: ext/intl/resourcebundle/resourcebundle_class.c
| From: | Nikita Popov | Date: | Thu, 28 Dec 2017 11:25:01 +0000 |
| Subject: | com php-src: Use free_obj for intl ResourceBundle: ext/intl/resourcebundle/resourcebundle_class.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-100713@lists.php.net to get a copy of this message | ||
Commit: 3538cbe6c03172c069862f3fdd345c990a734d7a
Author: Nikita Popov <nikita.ppv@gmail.com> Thu, 28 Dec 2017 12:25:01 +0100
Parents: bee5bc78ed4c195feb034983def68be0e1d93048
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3538cbe6c03172c069862f3fdd345c990a734d7a
Log:
Use free_obj for intl ResourceBundle
Partial fix for bug #67911, the part about __destruct() not being
called.
Bugs:
https://bugs.php.net/67911
Changed paths:
M ext/intl/resourcebundle/resourcebundle_class.c
Diff:
diff --git a/ext/intl/resourcebundle/resourcebundle_class.c
b/ext/intl/resourcebundle/resourcebundle_class.c
index 7cd6d2b..6d5825a 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;