diff options
-rw-r--r-- | Zend/zend_objects.c | 7 | ||||
-rw-r--r-- | Zend/zend_objects.h | 4 | ||||
-rw-r--r-- | Zend/zend_objects_API.h | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c index 30f6297c3d..d5579108c9 100644 --- a/Zend/zend_objects.c +++ b/Zend/zend_objects.c @@ -26,8 +26,9 @@ #include "zend_interfaces.h" -ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handle handle TSRMLS_DC) +ZEND_API void zend_objects_destroy_object(void *_object, zend_object_handle handle TSRMLS_DC) { + zend_object *object = (zend_object*)_object; zend_function *destructor = object->ce->destructor; if (destructor) { @@ -86,8 +87,10 @@ ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handl } } -ZEND_API void zend_objects_free_object_storage(zend_object *object TSRMLS_DC) +ZEND_API void zend_objects_free_object_storage(void *_object TSRMLS_DC) { + zend_object *object = (zend_object*)_object; + zend_hash_destroy(object->properties); FREE_HASHTABLE(object->properties); efree(object); diff --git a/Zend/zend_objects.h b/Zend/zend_objects.h index 047d611d45..a9aaf71175 100644 --- a/Zend/zend_objects.h +++ b/Zend/zend_objects.h @@ -26,11 +26,11 @@ BEGIN_EXTERN_C() ZEND_API zend_object_value zend_objects_new(zend_object **object, zend_class_entry *class_type TSRMLS_DC); -ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handle handle TSRMLS_DC); +ZEND_API void zend_objects_destroy_object(void *object, zend_object_handle handle TSRMLS_DC); ZEND_API zend_object *zend_objects_get_address(zval *object TSRMLS_DC); ZEND_API void zend_objects_clone_members(zend_object *new_object, zend_object_value new_obj_val, zend_object *old_object, zend_object_handle handle TSRMLS_DC); ZEND_API zend_object_value zend_objects_clone_obj(zval *object TSRMLS_DC); -ZEND_API void zend_objects_free_object_storage(zend_object *object TSRMLS_DC); +ZEND_API void zend_objects_free_object_storage(void *object TSRMLS_DC); END_EXTERN_C() #endif /* ZEND_OBJECTS_H */ diff --git a/Zend/zend_objects_API.h b/Zend/zend_objects_API.h index 02701941f2..b4c986ee1e 100644 --- a/Zend/zend_objects_API.h +++ b/Zend/zend_objects_API.h @@ -25,7 +25,7 @@ #include "zend.h" typedef void (*zend_objects_store_dtor_t)(void *object, zend_object_handle handle TSRMLS_DC); -typedef void (*zend_objects_free_object_storage_t)(zend_object *object TSRMLS_DC); +typedef void (*zend_objects_free_object_storage_t)(void *object TSRMLS_DC); typedef void (*zend_objects_store_clone_t)(void *object, void **object_clone TSRMLS_DC); |