summaryrefslogtreecommitdiff
path: root/stage3/def.h
diff options
context:
space:
mode:
Diffstat (limited to 'stage3/def.h')
-rw-r--r--stage3/def.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/stage3/def.h b/stage3/def.h
index e973d5e..1da628e 100644
--- a/stage3/def.h
+++ b/stage3/def.h
@@ -24,4 +24,12 @@ typedef u8 bool;
#define BITCAST(expr, from, to) (((union { from f; to t; }) { .f = expr }).t)
+typedef struct {
+ usize len;
+ char *data;
+} str;
+
+#define S(x) ((str) { sizeof (x) - 1, (x) })
+#define NILS ((str) { 0, nil })
+
#endif