diff options
| author | 2025-12-15 21:46:24 +0100 | |
|---|---|---|
| committer | 2025-12-15 21:46:24 +0100 | |
| commit | c6c0f2ef35175075e91169113cfe856f29b3eb9a (patch) | |
| tree | 65dc85d7b2845a4e1145ac9d6ffd26fbb2482e8e /common.h | |
| parent | bf0f2805b5aec7f4fa5fb4ff1a4da081a0112e4e (diff) | |
move intern() to mem.c
Being in lex.c was vestigial, since it was being used all over the
frontend and backend.
Diffstat (limited to 'common.h')
| -rw-r--r-- | common.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -178,6 +178,9 @@ void free(void *); #define xcalloc(n) xcalloc(n, __func__) #define xrealloc(p,n) xrealloc(p, n, __func__) +/* string interning */ +const char *intern(const char *); + /* growable buffer that stores its capacity in the allocated memory */ #define xbnew_(n) (void *)(1 + (size_t *)xcalloc(sizeof(size_t) + (n))) #define xbcap_(p) ((size_t *)(p))[-1] |