|
|
|
@ -48,7 +48,9 @@ ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects TS |
|
|
|
struct _store_object *obj = &objects->object_buckets[i].bucket.obj; |
|
|
|
if (obj->dtor && !objects->object_buckets[i].destructor_called) { |
|
|
|
objects->object_buckets[i].destructor_called = 1; |
|
|
|
obj->dtor(obj->object, i TSRMLS_CC); |
|
|
|
if (obj->dtor) { |
|
|
|
obj->dtor(obj->object, i TSRMLS_CC); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -61,7 +63,7 @@ ZEND_API void zend_objects_store_free_object_storage(zend_objects_store *objects |
|
|
|
for (i = 1; i < objects->top ; i++) { |
|
|
|
struct _store_object *obj = &objects->object_buckets[i].bucket.obj; |
|
|
|
if (obj->free_storage) { |
|
|
|
obj->free_storage(obj->object, i TSRMLS_CC); |
|
|
|
obj->free_storage(obj->object TSRMLS_CC); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -205,7 +207,7 @@ ZEND_API zval **zend_object_create_proxy(zval *object, zval *member TSRMLS_DC) |
|
|
|
|
|
|
|
MAKE_STD_ZVAL(retval); |
|
|
|
retval->type = IS_OBJECT; |
|
|
|
Z_OBJ_HANDLE_P(retval) = zend_objects_store_put(pobj, NULL, (zend_objects_store_dtor_t) zend_objects_proxy_free_storage, (zend_objects_store_clone_t) zend_objects_proxy_clone TSRMLS_CC); |
|
|
|
Z_OBJ_HANDLE_P(retval) = zend_objects_store_put(pobj, NULL, (zend_objects_free_object_storage_t) zend_objects_proxy_free_storage, (zend_objects_store_clone_t) zend_objects_proxy_clone TSRMLS_CC); |
|
|
|
Z_OBJ_HT_P(retval) = &zend_object_proxy_handlers; |
|
|
|
pretval = emalloc(sizeof(zval *)); |
|
|
|
*pretval = retval; |
|
|
|
|