From 42420560678a0c17c993d77fcf784efae6e927d2 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Mon, 6 Sep 2010 23:00:52 -0700 Subject: [PATCH] Ranked longness for stdint types. --- Cython/Includes/libc/stdint.pxd | 59 +++++++++++++++++---------------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/Cython/Includes/libc/stdint.pxd b/Cython/Includes/libc/stdint.pxd index 61e0f322..21e6c339 100644 --- a/Cython/Includes/libc/stdint.pxd +++ b/Cython/Includes/libc/stdint.pxd @@ -1,40 +1,43 @@ +# Longness only used for type promotion. +# Actual compile time size used for conversions. + # 7.18 Integer types cdef extern from "stdint.h" nogil: # 7.18.1 Integer types # 7.18.1.1 Exact-width integer types - ctypedef signed int int8_t - ctypedef signed int int16_t - ctypedef signed int int32_t - ctypedef signed int int64_t - ctypedef unsigned int uint8_t - ctypedef unsigned int uint16_t - ctypedef unsigned int uint32_t - ctypedef unsigned int uint64_t + ctypedef signed char int8_t + ctypedef signed short int16_t + ctypedef signed int int32_t + ctypedef signed long int64_t + ctypedef unsigned char uint8_t + ctypedef unsigned short uint16_t + ctypedef unsigned int uint32_t + ctypedef unsigned long uint64_t # 7.18.1.2 Minimum-width integer types - ctypedef signed int int_least8_t - ctypedef signed int int_least16_t - ctypedef signed int int_least32_t - ctypedef signed int int_least64_t - ctypedef unsigned int uint_least8_t - ctypedef unsigned int uint_least16_t - ctypedef unsigned int uint_least32_t - ctypedef unsigned int uint_least64_t + ctypedef signed char int_least8_t + ctypedef signed short int_least16_t + ctypedef signed int int_least32_t + ctypedef signed long int_least64_t + ctypedef unsigned char uint_least8_t + ctypedef unsigned short uint_least16_t + ctypedef unsigned int uint_least32_t + ctypedef unsigned long uint_least64_t # 7.18.1.3 Fastest minimum-width integer types - ctypedef signed int int_fast8_t - ctypedef signed int int_fast16_t - ctypedef signed int int_fast32_t - ctypedef signed int int_fast64_t - ctypedef unsigned int uint_fast8_t - ctypedef unsigned int uint_fast16_t - ctypedef unsigned int uint_fast32_t - ctypedef unsigned int uint_fast64_t + ctypedef signed char int_fast8_t + ctypedef signed short int_fast16_t + ctypedef signed int int_fast32_t + ctypedef signed long int_fast64_t + ctypedef unsigned char uint_fast8_t + ctypedef unsigned short uint_fast16_t + ctypedef unsigned int uint_fast32_t + ctypedef unsigned long uint_fast64_t # 7.18.1.4 Integer types capable of holding object pointers - ctypedef signed int intptr_t - ctypedef unsigned int uintptr_t + ctypedef ssize_t intptr_t + ctypedef size_t uintptr_t # 7.18.1.5 Greatest-width integer types - ctypedef signed int intmax_t - ctypedef unsigned int uintmax_t + ctypedef signed long long intmax_t + ctypedef unsigned long long uintmax_t # 7.18.2 Limits of specified-width integer types # 7.18.2.1 Limits of exact-width integer types -- 2.26.2