#pragma once #include #define SCOPE_WORD_MAX 256 /* member strings are borrowed and shouldn't be freed by the node */ typedef struct Scope Scope; struct Scope { int used; const char *words[SCOPE_WORD_MAX]; int values[SCOPE_WORD_MAX]; XXH32_hash_t words_hash[SCOPE_WORD_MAX]; const Scope *parent; }; /* created pointer shall be manualy freed by caller */ Scope *scope_create(const Scope *parent); int scope_insert(Scope *scope, const char *word, int value);