Make NS_LIKELY/NS_UNLIKELY accept pointers etc. b=340244 r+sr=darin

git-svn-id: svn://10.0.0.236/trunk@215037 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mats.palmgren%bredband.net
2006-11-09 17:41:03 +00:00
parent e5aaecc35e
commit 54cfbc0751

View File

@@ -459,8 +459,8 @@ typedef PRUint32 nsrefcnt;
*/
#if defined(__GNUC__) && (__GNUC__ > 2)
#define NS_LIKELY(x) (__builtin_expect((x), 1))
#define NS_UNLIKELY(x) (__builtin_expect((x), 0))
#define NS_LIKELY(x) (__builtin_expect(!!(x), 1))
#define NS_UNLIKELY(x) (__builtin_expect(!!(x), 0))
#else
#define NS_LIKELY(x) (x)
#define NS_UNLIKELY(x) (x)