Luna/luna/Types.h

25 lines
607 B
C

#include <stddef.h>
#include <stdint.h>
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;
typedef int8_t i8;
typedef int16_t i16;
typedef int32_t i32;
typedef int64_t i64;
typedef size_t usize;
typedef int64_t isize;
static_assert(sizeof(u8) == 1UL);
static_assert(sizeof(u16) == 2UL);
static_assert(sizeof(u32) == 4UL);
static_assert(sizeof(u64) == 8UL);
static_assert(sizeof(i8) == 1UL);
static_assert(sizeof(i16) == 2UL);
static_assert(sizeof(i32) == 4UL);
static_assert(sizeof(i64) == 8UL);
static_assert(sizeof(usize) == 8UL);
static_assert(sizeof(isize) == 8UL);