1 # Longness only used for type promotion.
2 # Actual compile time size used for conversions.
4 # 7.18 Integer types <stdint.h>
5 cdef extern from "stdint.h" nogil:
8 # 7.18.1.1 Exact-width integer types
9 ctypedef signed char int8_t
10 ctypedef signed short int16_t
11 ctypedef signed int int32_t
12 ctypedef signed long int64_t
13 ctypedef unsigned char uint8_t
14 ctypedef unsigned short uint16_t
15 ctypedef unsigned int uint32_t
16 ctypedef unsigned long uint64_t
17 # 7.18.1.2 Minimum-width integer types
18 ctypedef signed char int_least8_t
19 ctypedef signed short int_least16_t
20 ctypedef signed int int_least32_t
21 ctypedef signed long int_least64_t
22 ctypedef unsigned char uint_least8_t
23 ctypedef unsigned short uint_least16_t
24 ctypedef unsigned int uint_least32_t
25 ctypedef unsigned long uint_least64_t
26 # 7.18.1.3 Fastest minimum-width integer types
27 ctypedef signed char int_fast8_t
28 ctypedef signed short int_fast16_t
29 ctypedef signed int int_fast32_t
30 ctypedef signed long int_fast64_t
31 ctypedef unsigned char uint_fast8_t
32 ctypedef unsigned short uint_fast16_t
33 ctypedef unsigned int uint_fast32_t
34 ctypedef unsigned long uint_fast64_t
35 # 7.18.1.4 Integer types capable of holding object pointers
36 ctypedef ssize_t intptr_t
37 ctypedef size_t uintptr_t
38 # 7.18.1.5 Greatest-width integer types
39 ctypedef signed long long intmax_t
40 ctypedef unsigned long long uintmax_t
42 # 7.18.2 Limits of specified-width integer types
43 # 7.18.2.1 Limits of exact-width integer types
56 #7.18.2.2 Limits of minimum-width integer types
57 int_least8_t INT_LEAST8_MIN
58 int_least16_t INT_LEAST16_MIN
59 int_least32_t INT_LEAST32_MIN
60 int_least64_t INT_LEAST64_MIN
61 int_least8_t INT_LEAST8_MAX
62 int_least16_t INT_LEAST16_MAX
63 int_least32_t INT_LEAST32_MAX
64 int_least64_t INT_LEAST64_MAX
65 uint_least8_t UINT_LEAST8_MAX
66 uint_least16_t UINT_LEAST16_MAX
67 uint_least32_t UINT_LEAST32_MAX
68 uint_least64_t UINT_LEAST64_MAX
69 #7.18.2.3 Limits of fastest minimum-width integer types
70 int_fast8_t INT_FAST8_MIN
71 int_fast16_t INT_FAST16_MIN
72 int_fast32_t INT_FAST32_MIN
73 int_fast64_t INT_FAST64_MIN
74 int_fast8_t INT_FAST8_MAX
75 int_fast16_t INT_FAST16_MAX
76 int_fast32_t INT_FAST32_MAX
77 int_fast64_t INT_FAST64_MAX
78 uint_fast8_t UINT_FAST8_MAX
79 uint_fast16_t UINT_FAST16_MAX
80 uint_fast32_t UINT_FAST32_MAX
81 uint_fast64_t UINT_FAST64_MAX
82 #7.18.2.4 Limits of integer types capable of holding object pointers
86 # 7.18.2.5 Limits of greatest-width integer types
91 # 7.18.3 Limits of other integer types