diff options
Diffstat (limited to 'Zend/zend_objects_API.h')
-rw-r--r-- | Zend/zend_objects_API.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Zend/zend_objects_API.h b/Zend/zend_objects_API.h index c27ac339dc..0bb51c162d 100644 --- a/Zend/zend_objects_API.h +++ b/Zend/zend_objects_API.h @@ -52,23 +52,21 @@ BEGIN_EXTERN_C() ZEND_API void zend_objects_store_init(zend_objects_store *objects, uint32_t init_size); ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects); ZEND_API void zend_objects_store_mark_destructed(zend_objects_store *objects); +ZEND_API void zend_objects_store_free_object_storage(zend_objects_store *objects, zend_bool fast_shutdown); ZEND_API void zend_objects_store_destroy(zend_objects_store *objects); /* Store API functions */ ZEND_API void zend_objects_store_put(zend_object *object); ZEND_API void zend_objects_store_del(zend_object *object); -ZEND_API void zend_objects_store_free(zend_object *object); -/* See comment in zend_objects_API.c before you use this */ -ZEND_API void zend_object_store_set_object(zval *zobject, zend_object *object); -ZEND_API void zend_object_store_ctor_failed(zend_object *object); - -ZEND_API void zend_objects_store_free_object_storage(zend_objects_store *objects); +/* Called when the ctor was terminated by an exception */ +static zend_always_inline void zend_object_store_ctor_failed(zend_object *obj) +{ + GC_FLAGS(obj) |= IS_OBJ_DESTRUCTOR_CALLED; +} #define ZEND_OBJECTS_STORE_HANDLERS 0, zend_object_std_dtor, zend_objects_destroy_object, zend_objects_clone_obj -ZEND_API zend_object *zend_object_create_proxy(zval *object, zval *member); - ZEND_API zend_object_handlers *zend_get_std_object_handlers(void); END_EXTERN_C() @@ -76,7 +74,7 @@ static zend_always_inline void zend_object_release(zend_object *obj) { if (--GC_REFCOUNT(obj) == 0) { zend_objects_store_del(obj); - } else if (UNEXPECTED(!GC_INFO(obj))) { + } else if (UNEXPECTED(GC_MAY_LEAK((zend_refcounted*)obj))) { gc_possible_root((zend_refcounted*)obj); } } @@ -96,4 +94,6 @@ static zend_always_inline size_t zend_object_properties_size(zend_class_entry *c * c-basic-offset: 4 * indent-tabs-mode: t * End: + * vim600: sw=4 ts=4 fdm=marker + * vim<600: sw=4 ts=4 */ |