com php-src: Remove unnecessary destroy wrappers: Zend/zend_v ariables.c
| From: | Nikita Popov | Date: | Sun, 16 Sep 2018 15:16:26 +0000 |
| Subject: | com php-src: Remove unnecessary destroy wrappers: Zend/zend_v ariables.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-103118@lists.php.net to get a copy of this message | ||
Commit: d51b9a690e0322700628678795874c0878ab6f91
Author: Nikita Popov <nikita.ppv@gmail.com> Sun, 16 Sep 2018 17:14:46 +0200
Parents: dfa166e7ed28479b2d979fa3318c669732969d4d
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d51b9a690e0322700628678795874c0878ab6f91
Log:
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.
Changed paths:
M Zend/zend_variables.c
Diff:
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index 34fc8bc..7afda25 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);