diff options
Diffstat (limited to 'include/kpl/type.h')
| -rw-r--r-- | include/kpl/type.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/kpl/type.h b/include/kpl/type.h new file mode 100644 index 0000000..b18f6ae --- /dev/null +++ b/include/kpl/type.h @@ -0,0 +1,29 @@ + +#pragma once + +// KPL specific types + +#include "system.h" + +typedef enum : int32_t { + KPL_EXIT_CODE_SUCCESS = 0, + KPL_EXIT_CODE_ERROR = 1, + KPL_EXIT_CODE_HELP = 2 +} kpl_exit_code; + +typedef uint8_t kpl_utf8[4]; + +typedef union { + uint8_t u8; + int8_t i8; + uint16_t u16; + int16_t i16; + uint32_t u32; + int32_t i32; + uint64_t u64; + int64_t i64; + kpl_utf8 utf8; + float f32; + double f64; + void *ptr; +} kpl_value; |
