aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/int16.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-10-19 14:07:53 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-10-19 14:07:53 -0400
commit1713c56dbf8ffaa01e559c7564928721e363ca39 (patch)
treeb1e1886076b3e44d95e082e2d1a8eb6db1437aec /src/stdlib/int16.h
parent3a2077067343a20f631ec36838e197b34ff422f4 (diff)
Move integer implementation details into separate header/C files, backed
by template headers that use an INT_BITS macro to redefine implementations for different int sizes.
Diffstat (limited to 'src/stdlib/int16.h')
-rw-r--r--src/stdlib/int16.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/stdlib/int16.h b/src/stdlib/int16.h
new file mode 100644
index 00000000..d7490292
--- /dev/null
+++ b/src/stdlib/int16.h
@@ -0,0 +1,4 @@
+#define INTX_H__INT_BITS 16
+#define I16(i) (int16_t)(i)
+#include "intX.h" // IWYU pragma: export
+#define NONE_INT16 ((OptionalInt16_t){.has_value = false})