summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2018-09-16 17:14:46 +0200
committerNikita Popov <nikita.ppv@gmail.com>2018-09-16 17:16:26 +0200
commitd51b9a690e0322700628678795874c0878ab6f91 (patch)
treeab03c54f18b9199fb2ec28eb7cab92fa8a16bdb2
parentdfa166e7ed28479b2d979fa3318c669732969d4d (diff)
downloadphp-git-d51b9a690e0322700628678795874c0878ab6f91.tar.gz
Remove unnecessary destroy wrappers
There used to be needed due to ZEND_FILE_LINE in debug builds. As the argument is no longer passed, we don't need the wrappers either.
-rw-r--r--Zend/zend_variables.c42
1 files changed, 4 insertions, 38 deletions
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index 34fc8bc271..7afda25b34 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -30,18 +30,6 @@ static void ZEND_FASTCALL zend_string_destroy(zend_string *str);
static void ZEND_FASTCALL zend_reference_destroy(zend_reference *ref);
static void ZEND_FASTCALL zend_empty_destroy(zend_reference *ref);
-#if ZEND_DEBUG
-static void ZEND_FASTCALL zend_array_destroy_wrapper(zend_array *arr);
-static void ZEND_FASTCALL zend_object_destroy_wrapper(zend_object *obj);
-static void ZEND_FASTCALL zend_resource_destroy_wrapper(zend_resource *res);
-static void ZEND_FASTCALL zend_ast_ref_destroy_wrapper(zend_ast_ref *ast);
-#else
-# define zend_array_destroy_wrapper zend_array_destroy
-# define zend_object_destroy_wrapper zend_objects_store_del
-# define zend_resource_destroy_wrapper zend_list_free
-# define zend_ast_ref_destroy_wrapper zend_ast_ref_destroy
-#endif
-
typedef void (ZEND_FASTCALL *zend_rc_dtor_func_t)(zend_refcounted *p);
static const zend_rc_dtor_func_t zend_rc_dtor_func[] = {
@@ -52,11 +40,11 @@ static const zend_rc_dtor_func_t zend_rc_dtor_func[] = {
/* IS_LONG */ (zend_rc_dtor_func_t)zend_empty_destroy,
/* IS_DOUBLE */ (zend_rc_dtor_func_t)zend_empty_destroy,
/* IS_STRING */ (zend_rc_dtor_func_t)zend_string_destroy,
- /* IS_ARRAY */ (zend_rc_dtor_func_t)zend_array_destroy_wrapper,
- /* IS_OBJECT */ (zend_rc_dtor_func_t)zend_object_destroy_wrapper,
- /* IS_RESOURCE */ (zend_rc_dtor_func_t)zend_resource_destroy_wrapper,
+ /* IS_ARRAY */ (zend_rc_dtor_func_t)zend_array_destroy,
+ /* IS_OBJECT */ (zend_rc_dtor_func_t)zend_objects_store_del,
+ /* IS_RESOURCE */ (zend_rc_dtor_func_t)zend_list_free,
/* IS_REFERENCE */ (zend_rc_dtor_func_t)zend_reference_destroy,
- /* IS_CONSTANT_AST */ (zend_rc_dtor_func_t)zend_ast_ref_destroy_wrapper
+ /* IS_CONSTANT_AST */ (zend_rc_dtor_func_t)zend_ast_ref_destroy
};
ZEND_API void ZEND_FASTCALL rc_dtor_func(zend_refcounted *p)
@@ -84,28 +72,6 @@ static void ZEND_FASTCALL zend_empty_destroy(zend_reference *ref)
{
}
-#if ZEND_DEBUG
-static void ZEND_FASTCALL zend_array_destroy_wrapper(zend_array *arr)
-{
- zend_array_destroy(arr);
-}
-
-static void ZEND_FASTCALL zend_object_destroy_wrapper(zend_object *obj)
-{
- zend_objects_store_del(obj);
-}
-
-static void ZEND_FASTCALL zend_resource_destroy_wrapper(zend_resource *res)
-{
- zend_list_free(res);
-}
-
-static void ZEND_FASTCALL zend_ast_ref_destroy_wrapper(zend_ast_ref *ast)
-{
- zend_ast_ref_destroy(ast);
-}
-#endif
-
ZEND_API void zval_ptr_dtor(zval *zval_ptr) /* {{{ */
{
i_zval_ptr_dtor(zval_ptr);