minor cleanups
authorStefan Behnel <stefan_ml@behnel.de>
Sat, 9 Mar 2013 19:16:13 +0000 (20:16 +0100)
committerStefan Behnel <stefan_ml@behnel.de>
Sat, 9 Mar 2013 19:16:13 +0000 (20:16 +0100)
Cython/Utility/Overflow.c

index b919d77..922dfb5 100644 (file)
@@ -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))