stdint.pxd 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. # Longness only used for type promotion.
  2. # Actual compile time size used for conversions.
  3. # 7.18 Integer types <stdint.h>
  4. cdef extern from "<stdint.h>" nogil:
  5. # 7.18.1 Integer types
  6. # 7.18.1.1 Exact-width integer types
  7. ctypedef signed char int8_t
  8. ctypedef signed short int16_t
  9. ctypedef signed int int32_t
  10. ctypedef signed long int64_t
  11. ctypedef unsigned char uint8_t
  12. ctypedef unsigned short uint16_t
  13. ctypedef unsigned int uint32_t
  14. ctypedef unsigned long long uint64_t
  15. # 7.18.1.2 Minimum-width integer types
  16. ctypedef signed char int_least8_t
  17. ctypedef signed short int_least16_t
  18. ctypedef signed int int_least32_t
  19. ctypedef signed long int_least64_t
  20. ctypedef unsigned char uint_least8_t
  21. ctypedef unsigned short uint_least16_t
  22. ctypedef unsigned int uint_least32_t
  23. ctypedef unsigned long long uint_least64_t
  24. # 7.18.1.3 Fastest minimum-width integer types
  25. ctypedef signed char int_fast8_t
  26. ctypedef signed short int_fast16_t
  27. ctypedef signed int int_fast32_t
  28. ctypedef signed long int_fast64_t
  29. ctypedef unsigned char uint_fast8_t
  30. ctypedef unsigned short uint_fast16_t
  31. ctypedef unsigned int uint_fast32_t
  32. ctypedef unsigned long long uint_fast64_t
  33. # 7.18.1.4 Integer types capable of holding object pointers
  34. ctypedef ssize_t intptr_t
  35. ctypedef size_t uintptr_t
  36. # 7.18.1.5 Greatest-width integer types
  37. ctypedef signed long long intmax_t
  38. ctypedef unsigned long long uintmax_t
  39. # 7.18.2 Limits of specified-width integer types
  40. # 7.18.2.1 Limits of exact-width integer types
  41. int8_t INT8_MIN
  42. int16_t INT16_MIN
  43. int32_t INT32_MIN
  44. int64_t INT64_MIN
  45. int8_t INT8_MAX
  46. int16_t INT16_MAX
  47. int32_t INT32_MAX
  48. int64_t INT64_MAX
  49. uint8_t UINT8_MAX
  50. uint16_t UINT16_MAX
  51. uint32_t UINT32_MAX
  52. uint64_t UINT64_MAX
  53. #7.18.2.2 Limits of minimum-width integer types
  54. int_least8_t INT_LEAST8_MIN
  55. int_least16_t INT_LEAST16_MIN
  56. int_least32_t INT_LEAST32_MIN
  57. int_least64_t INT_LEAST64_MIN
  58. int_least8_t INT_LEAST8_MAX
  59. int_least16_t INT_LEAST16_MAX
  60. int_least32_t INT_LEAST32_MAX
  61. int_least64_t INT_LEAST64_MAX
  62. uint_least8_t UINT_LEAST8_MAX
  63. uint_least16_t UINT_LEAST16_MAX
  64. uint_least32_t UINT_LEAST32_MAX
  65. uint_least64_t UINT_LEAST64_MAX
  66. #7.18.2.3 Limits of fastest minimum-width integer types
  67. int_fast8_t INT_FAST8_MIN
  68. int_fast16_t INT_FAST16_MIN
  69. int_fast32_t INT_FAST32_MIN
  70. int_fast64_t INT_FAST64_MIN
  71. int_fast8_t INT_FAST8_MAX
  72. int_fast16_t INT_FAST16_MAX
  73. int_fast32_t INT_FAST32_MAX
  74. int_fast64_t INT_FAST64_MAX
  75. uint_fast8_t UINT_FAST8_MAX
  76. uint_fast16_t UINT_FAST16_MAX
  77. uint_fast32_t UINT_FAST32_MAX
  78. uint_fast64_t UINT_FAST64_MAX
  79. #7.18.2.4 Limits of integer types capable of holding object pointers
  80. enum: INTPTR_MIN
  81. enum: INTPTR_MAX
  82. enum: UINTPTR_MAX
  83. # 7.18.2.5 Limits of greatest-width integer types
  84. enum: INTMAX_MAX
  85. enum: INTMAX_MIN
  86. enum: UINTMAX_MAX
  87. # 7.18.3 Limits of other integer types
  88. # ptrdiff_t
  89. enum: PTRDIFF_MIN
  90. enum: PTRDIFF_MAX
  91. # sig_atomic_t
  92. enum: SIG_ATOMIC_MIN
  93. enum: SIG_ATOMIC_MAX
  94. # size_t
  95. size_t SIZE_MAX
  96. # wchar_t
  97. enum: WCHAR_MIN
  98. enum: WCHAR_MAX
  99. # wint_t
  100. enum: WINT_MIN
  101. enum: WINT_MAX