From a5f9d8bad2bd2dbee6977775df0573f9191cd7cf Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 21 Nov 2007 14:55:51 +0000 Subject: [PATCH] Macro definitions are moved to zend.h --- Zend/zend.h | 8 ++++++++ Zend/zend_alloc.c | 5 ----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Zend/zend.h b/Zend/zend.h index 4daf17c7c0..6147c31013 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -367,6 +367,14 @@ struct _zval_struct { #define zend_always_inline inline #endif +#if (defined (__GNUC__) && __GNUC__ > 2 ) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) +# define EXPECTED(condition) __builtin_expect(condition, 1) +# define UNEXPECTED(condition) __builtin_expect(condition, 0) +#else +# define EXPECTED(condition) (condition) +# define UNEXPECTED(condition) (condition) +#endif + static zend_always_inline zend_uint zval_refcount_p(zval* pz) { return pz->refcount__gc; } diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 7ae0a9f6cb..492fae29e0 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -80,12 +80,7 @@ void zend_debug_alloc_output(char *format, ...) /* {{{ */ #endif #if (defined (__GNUC__) && __GNUC__ > 2 ) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) -# define EXPECTED(condition) __builtin_expect(condition, 1) -# define UNEXPECTED(condition) __builtin_expect(condition, 0) static void zend_mm_panic(const char *message) __attribute__ ((noreturn)); -#else -# define EXPECTED(condition) (condition) -# define UNEXPECTED(condition) (condition) #endif static void zend_mm_panic(const char *message) /* {{{ */ -- 2.40.0