From 6583fe9b389a6b4698f9364945885e6783506886 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 1 Oct 2025 12:43:00 -0400 Subject: Convert to using more zero values for `none` --- src/parse/files.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/parse') diff --git a/src/parse/files.c b/src/parse/files.c index caecbbe8..5e0dc29c 100644 --- a/src/parse/files.c +++ b/src/parse/files.c @@ -17,7 +17,6 @@ #include "statements.h" #include "text.h" #include "typedefs.h" -#include "types.h" #include "utils.h" // The cache of {filename -> parsed AST} will hold at most this many entries: @@ -67,7 +66,7 @@ ast_t *parse_file(const char *path, jmp_buf *on_err) { // hold more than PARSE_CACHE_SIZE entries (see below), but each entry's // AST holds onto a reference to the file it came from, so they could // potentially be somewhat large. - static Table_t cached = {}; + static Table_t cached = EMPTY_TABLE; ast_t *ast = Table$str_get(cached, path); if (ast) return ast; @@ -106,6 +105,7 @@ ast_t *parse_file(const char *path, jmp_buf *on_err) { const char *path; ast_t *ast; } *to_remove = Table$entry(cached, 1); + assert(to_remove); Table$str_remove(&cached, to_remove->path); } -- cgit v1.2.3