aboutsummaryrefslogtreecommitdiff
path: root/src/compiler.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2025-03-22 16:55:57 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2025-03-22 16:55:57 +0200
commit0db19dcfafe5b2b3cbebaec9098ec50b9d6b1102 (patch)
tree0314951c6082354bce47f7d2da4c55736dd53705 /src/compiler.c
parent7b5abecd2bef6b7441b0d850f95d451b441a6f76 (diff)
downloadek-0db19dcfafe5b2b3cbebaec9098ec50b9d6b1102.tar.gz
ek-0db19dcfafe5b2b3cbebaec9098ec50b9d6b1102.zip
use new hashmap
Diffstat (limited to 'src/compiler.c')
-rw-r--r--src/compiler.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler.c b/src/compiler.c
index 6f24ee6..90f5fd0 100644
--- a/src/compiler.c
+++ b/src/compiler.c
@@ -112,6 +112,7 @@ static int process(struct scope *scope, const char *file)
#define MAP_KEY char *
#define MAP_TYPE struct scope *
#define MAP_CMP(a, b) strcmp((a), (b))
+#define MAP_HASH(a) CONTS_MAP_STR_HASH(a)
#define MAP_NAME scopes
#include <conts/map.h>
@@ -195,7 +196,7 @@ out:
}
int compile(const char *input) {
- scopes = scopes_create();
+ scopes = scopes_create(1);
int ret = -1;
struct scope *root = process_file(input);