diff options
| author | 2025-12-20 12:11:16 +0100 | |
|---|---|---|
| committer | 2025-12-20 12:11:16 +0100 | |
| commit | 640d5e95560d3c9099a58e09a93831197b863a2b (patch) | |
| tree | 4050b9ee8ac6ca0332069d7265cbf39f3a5872a1 /common.h | |
| parent | 059a9a0b01010298b7e45228cfb5ef4010bc22bc (diff) | |
optimize lexer a bit more
Diffstat (limited to 'common.h')
| -rw-r--r-- | common.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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))) |