# Builtin integer/float/char types are provided by the compiler; this module only adds C-style aliases. # ============================================================================= # Uppercase aliases (Win32/TransPyC style) # Note: INTPTR/UINTPTR are int*/unsigned int* pointer types here (historical), unlike the C intptr_t/uintptr_t integer types in the lowercase _t section below. # ============================================================================= typedef INT = int typedef INTPTR = int* typedef BOOL = int typedef UINT = uint typedef UINTPTR = UINT* typedef BYTE = uchar typedef BYTEPTR = BYTE* typedef WORD = uint16 typedef DWORD = uint32 typedef QWORD = uint64 typedef TCHAR = char typedef CHARLIST = str* typedef VOID = void typedef SHORT = int16 typedef SHORTPTR = int16* typedef USHORT = uint16 typedef USHORTPTR = uint16* typedef LONGLONG = int64 typedef ULONGLONG = uint64 typedef LONG = int32 typedef ULONG = uint32 typedef WCHAR = WORD typedef WCHARPTR = WORD* typedef CHARPTR = char* typedef VOIDPTR = rawptr typedef FLOAT = float typedef DOUBLE = double typedef FLOAT8 = float8 typedef FLOAT16 = float16 typedef FLOAT32 = float32 typedef FLOAT64 = double typedef FLOAT128 = float128 # ============================================================================= # Fixed-width uppercase integer aliases # ============================================================================= typedef INT8 = int8 typedef INT16 = int16 typedef INT32 = int32 typedef INT64 = int64 typedef UINT8 = uint8 typedef UINT16 = uint16 typedef UINT32 = uint32 typedef UINT64 = uint64 typedef INT8PTR = int8* typedef INT16PTR = int16* typedef INT32PTR = int32* typedef INT64PTR = int64* typedef UINT8PTR = uint8* typedef UINT16PTR = uint16* typedef UINT32PTR = uint32* typedef UINT64PTR = uint64* typedef CHAR8 = char8 typedef CHAR16 = char16 typedef CHAR32 = char32 typedef CHAR8PTR = char8* typedef CHAR16PTR = char16* typedef CHAR32PTR = char32* typedef i8 = int8 typedef i16 = int16 typedef i32 = int32 typedef i64 = int64 typedef u8 = uint8 typedef u16 = uint16 typedef u32 = uint32 typedef u64 = uint64 typedef SIZE_T = sizet typedef SSIZE_T = ptrdifft typedef PTRDIFF_T = ptrdifft # ============================================================================= # C standard library type names (lowercase _t suffix) # C standard type names provided here as typedefs; after `from stdint import *` you can use int8_t / size_t etc. directly. # ============================================================================= typedef int8_t = int8 typedef int16_t = int16 typedef int32_t = int32 typedef int64_t = int64 typedef uint8_t = uint8 typedef uint16_t = uint16 typedef uint32_t = uint32 typedef uint64_t = uint64 typedef size_t = sizet typedef ssize_t = ptrdifft typedef ptrdiff_t = ptrdifft # intptr_t/uintptr_t are integer types large enough to hold a pointer (NOT pointers!) # Different from the INTPTR/UINTPTR above (int pointers). typedef intptr_t = intptr typedef uintptr_t = uintptr # Wide-character / character types typedef wchar_t = wchar typedef char8_t = char8 typedef char16_t = char16 typedef char32_t = char32 # Floating-point specializations typedef float8_t = float8 typedef float16_t = float16 typedef float32_t = float32 typedef float64_t = double typedef float128_t = float128 typedef _Bool = bool