summary refs log tree commit diff
diff options
context:
space:
mode:
authorWormHeamer2025-03-10 15:19:44 -0400
committerWormHeamer2025-03-10 15:19:44 -0400
commit9ab6a07efd2b89b01020470c17b3b9341f391faf (patch)
treea7efa929f42438fe7110d3af1ecd4e049ddb80c5
parentec6c4cdbc7208b3e0d72278615205aee5068350a (diff)
move *_IMPL to a separate compilation unit
-rw-r--r--impl.c7
-rw-r--r--main.c2
2 files changed, 7 insertions, 2 deletions
diff --git a/impl.c b/impl.c
new file mode 100644
index 0000000..8226629
--- /dev/null
+++ b/impl.c
@@ -0,0 +1,7 @@
+#define STR_IMPL
+#define ARENA_IMPL
+#define ARGS_IMPL
+
+#include "str.h"
+#include "arena.h"
+#include "args.h"
diff --git a/main.c b/main.c
index 8336728..553ed06 100644
--- a/main.c
+++ b/main.c
@@ -8,10 +8,8 @@
 #include <errno.h>
 #include <sys/mman.h>
 
-#define ARENA_IMPL
 #include "str.h"
 #include "arena.h"
-#define ARGS_IMPL
 #include "args.h"
 
 #define ARENA(n, sz) Arena n; { static char arena_backarr[sz];\