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

This commit is contained in:
mats.palmgren%bredband.net 2006-11-09 17:41:03 +00:00
parent f04a29ec0d
commit c0ddcdaf16

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)