summaryrefslogtreecommitdiff
path: root/base.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-09-13 23:11:15 -0400
committerpommicket <pommicket@gmail.com>2023-09-14 10:47:51 -0400
commit52015e0c9a4e3bc8dc558929a85461f079dda303 (patch)
treebfdf9bda87934dbd96d4da1e87454d22184545b7 /base.h
parente33379bab95031555ed5459ee8a73672f24fd0a0 (diff)
batch write requests, fix tiny memory leak in ide-autocomplete
Diffstat (limited to 'base.h')
-rw-r--r--base.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/base.h b/base.h
index b438b19..da01fdc 100644
--- a/base.h
+++ b/base.h
@@ -66,6 +66,8 @@ typedef uint32_t char32_t;
#define static_assert_if_possible(cond)
#endif
+#ifndef SHORT_FIXED_SIZE_TYPES
+#define SHORT_FIXED_SIZE_TYPES
/// 8-bit unsigned integer
typedef uint8_t u8;
/// 16-bit unsigned integer
@@ -75,6 +77,16 @@ typedef uint32_t u32;
/// 64-bit unsigned integer
typedef uint64_t u64;
+/// 8-bit signed integer
+typedef int8_t i8;
+/// 16-bit signed integer
+typedef int16_t i16;
+/// 32-bit signed integer
+typedef int32_t i32;
+/// 64-bit signed integer
+typedef int64_t i64;
+#endif // SHORT_FIXED_SIZE_TYPES
+
/// maximum value of \ref u8
#define U8_MAX 0xff
/// maximum value of \ref u16
@@ -84,14 +96,6 @@ typedef uint64_t u64;
/// maximum value of \ref u64
#define U64_MAX 0xffffffffffffffff
-/// 8-bit signed integer
-typedef int8_t i8;
-/// 16-bit signed integer
-typedef int16_t i16;
-/// 32-bit signed integer
-typedef int32_t i32;
-/// 64-bit signed integer
-typedef int64_t i64;
/// minimum value of \ref i8
#define I8_MIN ((i8)0x80)