Commit 900dfde0 authored by Stefan Behnel's avatar Stefan Behnel

minor cleanups

parent 92a00f06
...@@ -31,8 +31,8 @@ static int __Pyx_check_twos_complement(void) { ...@@ -31,8 +31,8 @@ static int __Pyx_check_twos_complement(void) {
} }
} }
#define __PYX_IS_UNSIGNED(type) ((type) -1 > 0) #define __PYX_IS_UNSIGNED(type) (((type) -1) > 0)
#define __PYX_SIGN_BIT(type) ((unsigned type) 1 << (sizeof(type) * 8 - 1)) #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_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_MIN(type) (__PYX_IS_UNSIGNED(type) ? (type) 0 : 0 - __PYX_HALF_MAX(type) - __PYX_HALF_MAX(type))
#define __PYX_MAX(type) (~__PYX_MIN(type)) #define __PYX_MAX(type) (~__PYX_MIN(type))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment