summaryrefslogtreecommitdiff
path: root/Zend/zend.h
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend.h')
-rw-r--r--Zend/zend.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Zend/zend.h b/Zend/zend.h
index dd37c4d01e..75201c1190 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -329,6 +329,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;
}