From 900dfde0db36e50929bab30ff27e3ef62f129e69 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 9 Mar 2013 20:16:13 +0100 Subject: [PATCH] minor cleanups --- Cython/Utility/Overflow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cython/Utility/Overflow.c b/Cython/Utility/Overflow.c index b919d77..922dfb5 100644 --- a/Cython/Utility/Overflow.c +++ b/Cython/Utility/Overflow.c @@ -31,8 +31,8 @@ static int __Pyx_check_twos_complement(void) { } } -#define __PYX_IS_UNSIGNED(type) ((type) -1 > 0) -#define __PYX_SIGN_BIT(type) ((unsigned type) 1 << (sizeof(type) * 8 - 1)) +#define __PYX_IS_UNSIGNED(type) (((type) -1) > 0) +#define __PYX_SIGN_BIT(type) (((unsigned type) 1) << (sizeof(type) * 8 - 1)) #define __PYX_HALF_MAX(type) (((type) 1) << (sizeof(type) * 8 - 2)) #define __PYX_MIN(type) (__PYX_IS_UNSIGNED(type) ? (type) 0 : 0 - __PYX_HALF_MAX(type) - __PYX_HALF_MAX(type)) #define __PYX_MAX(type) (~__PYX_MIN(type)) -- 2.7.4