mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-27 18:00:12 +00:00
WIP move export and import table make code to appropriate layers
This commit is contained in:
committed by
Ryan Fleury
parent
69d5010245
commit
f467ff8822
@@ -329,6 +329,19 @@ keys_from_hash_table_u64(Arena *arena, HashTable *ht)
|
||||
return result;
|
||||
}
|
||||
|
||||
internal String8 *
|
||||
keys_from_hash_table_string(Arena *arena, HashTable *ht)
|
||||
{
|
||||
String8 *result = push_array_no_zero(arena, String8, ht->count);
|
||||
for (U64 bucket_idx = 0, cursor = 0; bucket_idx < ht->cap; ++bucket_idx) {
|
||||
for (BucketNode *n = ht->buckets[bucket_idx].first; n != 0; n = n->next) {
|
||||
Assert(cursor < ht->count);
|
||||
result[cursor++] = n->v.key_string;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
internal KeyValuePair *
|
||||
key_value_pairs_from_hash_table(Arena *arena, HashTable *ht)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user