aboutsummaryrefslogtreecommitdiffhomepage
path: root/common.h
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-12-20 12:11:16 +0100
committerlemon <lsof@mailbox.org>2025-12-20 12:11:16 +0100
commit640d5e95560d3c9099a58e09a93831197b863a2b (patch)
tree4050b9ee8ac6ca0332069d7265cbf39f3a5872a1 /common.h
parent059a9a0b01010298b7e45228cfb5ef4010bc22bc (diff)
optimize lexer a bit more
Diffstat (limited to 'common.h')
-rw-r--r--common.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/common.h b/common.h
index 6cf1b21..9e32ded 100644
--- a/common.h
+++ b/common.h
@@ -185,7 +185,8 @@ void free(void *);
/* string interning */
typedef const struct internstr {char c;} *internstr;
-internstr intern(const char *);
+internstr intern_(const char *, uint len);
+#define intern(s) intern_(s, 0)
/* growable buffer that stores its capacity in the allocated memory */
#define xbnew_(n) (void *)(1 + (size_t *)xcalloc(sizeof(size_t) + (n)))