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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user