feat: rename core types to scc prefix for consistency

Updated type names from `core_*` to `scc_*` across lex_parser and stream modules to maintain naming consistency within the SCC codebase. This includes changes to function signatures and internal usage of types like `core_probe_stream_t`, `core_pos_t`, and `cstring_t` to their `scc_*` counterparts.
This commit is contained in:
zzy
2025-12-11 13:00:29 +08:00
parent 35c13ee30a
commit d88fa3b8d3
33 changed files with 741 additions and 745 deletions

View File

@@ -1,8 +1,8 @@
#include "strpool.h"
void init_strpool(strpool_t *pool) {
pool->ht.hash_func = (u32 (*)(const void *))smcc_strhash32;
pool->ht.key_cmp = (int (*)(const void *, const void *))smcc_strcmp;
pool->ht.hash_func = (u32 (*)(const void *))scc_strhash32;
pool->ht.key_cmp = (int (*)(const void *, const void *))scc_strcmp;
hashmap_init(&pool->ht);
}
@@ -12,13 +12,13 @@ const char *strpool_intern(strpool_t *pool, const char *str) {
return existing;
}
usize len = smcc_strlen(str) + 1;
char *new_str = smcc_malloc(len);
usize len = scc_strlen(str) + 1;
char *new_str = scc_malloc(len);
if (!new_str) {
LOG_ERROR("strpool: Failed to allocate memory for string");
return NULL;
}
smcc_memcpy(new_str, str, len);
scc_memcpy(new_str, str, len);
hashmap_set(&pool->ht, new_str, new_str);
return new_str;