Misc changes

This commit is contained in:
Krzosa Karol
2022-12-31 14:16:46 +01:00
parent e07ad3c86d
commit 673db72e29
9 changed files with 174 additions and 76 deletions

View File

@@ -967,6 +967,7 @@ intern_string(Intern_Table *t, String string){
U64 hash = hash_string(string);
U8 *slot = (U8 *)map_get(&t->map, hash);
if(slot){
// @todo: Is this a cast bug: *(slot-sizeof(S64))? slot is u8 so truncates?
Intern_String result = {{slot, *(slot-sizeof(S64))}};
return result;
}