From 17ef13f81050eb7086bd80e00a82c4c2cb6a3c9b Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 23 Jun 2024 21:35:49 +0200 Subject: Rename symtab to symtab_t --- src/analyzer.c | 6 +++--- src/analyzer.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/analyzer.c b/src/analyzer.c index ce5087a..c1f7e05 100644 --- a/src/analyzer.c +++ b/src/analyzer.c @@ -98,7 +98,7 @@ static bool returns(ast_t, idx_t); /* Index the symbol table M with the key SV, returning a pointer to the value. If no entry exists and A is non-null, a pointer to a newly allocated (and zeroed) value is returned, NULL otherwise. */ -static idx_t *symtab_insert(symtab **m, strview_t sv, arena_t *a) +static idx_t *symtab_insert(symtab_t **m, strview_t sv, arena_t *a) __attribute__((nonnull(1))); /* Defined in primitives.gperf */ @@ -515,7 +515,7 @@ typecompat(type_t lhs, type_t rhs) } idx_t * -symtab_insert(symtab **m, strview_t k, arena_t *a) +symtab_insert(symtab_t **m, strview_t k, arena_t *a) { for (uint64_t h = strview_hash(k); *m; h <<= 2) { if (strview_eq(k, (*m)->key)) @@ -524,7 +524,7 @@ symtab_insert(symtab **m, strview_t k, arena_t *a) } if (a == NULL) return NULL; - *m = arena_new(a, symtab, 1); + *m = arena_new(a, symtab_t, 1); (*m)->key = k; (*m)->val = AST_EMPTY; return &(*m)->val; diff --git a/src/analyzer.h b/src/analyzer.h index d251117..2173694 100644 --- a/src/analyzer.h +++ b/src/analyzer.h @@ -31,11 +31,11 @@ enum { static_assert(_TYPE_LAST_ENT - 1 <= UINT8_MAX, "Too many AST tokens to fix in uint8_t"); -typedef struct symtab symtab; +typedef struct symtab symtab_t; typedef struct { idx_t up, i; - symtab *map; + symtab_t *map; } scope_t; /* A variable type */ -- cgit v1.2.3