From: Dmitry Stogov Date: Fri, 28 Dec 2018 12:25:57 +0000 (+0300) Subject: Eliminate zend_string_destroy() wrapper in release build X-Git-Tag: php-7.4.0alpha1~1325 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=617c90bcb9b3f1b783d49915416477e50010ebd1;p=php Eliminate zend_string_destroy() wrapper in release build --- diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c index 58b0a99c4a..c057390700 100644 --- a/Zend/zend_variables.c +++ b/Zend/zend_variables.c @@ -26,7 +26,11 @@ #include "zend_constants.h" #include "zend_list.h" +#if ZEND_DEBUG static void ZEND_FASTCALL zend_string_destroy(zend_string *str); +#else +# define zend_string_destroy _efree +#endif static void ZEND_FASTCALL zend_reference_destroy(zend_reference *ref); static void ZEND_FASTCALL zend_empty_destroy(zend_reference *ref); @@ -53,6 +57,7 @@ ZEND_API void ZEND_FASTCALL rc_dtor_func(zend_refcounted *p) zend_rc_dtor_func[GC_TYPE(p)](p); } +#if ZEND_DEBUG static void ZEND_FASTCALL zend_string_destroy(zend_string *str) { CHECK_ZVAL_STRING(str); @@ -61,6 +66,7 @@ static void ZEND_FASTCALL zend_string_destroy(zend_string *str) ZEND_ASSERT(!(GC_FLAGS(str) & IS_STR_PERSISTENT)); efree(str); } +#endif static void ZEND_FASTCALL zend_reference_destroy(zend_reference *ref) {