1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 04:02:19 +02:00

Macro definitions are moved to zend.h

This commit is contained in:
Dmitry Stogov
2007-11-21 14:55:51 +00:00
parent 21f68908b9
commit a5f9d8bad2
2 changed files with 8 additions and 5 deletions

View File

@@ -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;
}

View File

@@ -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) /* {{{ */