[maps] queues instead of stacks to keep things in order

This commit is contained in:
Allen Webster
2021-06-12 10:12:55 -07:00
parent fb999476fa
commit f54f1771b9
2 changed files with 26 additions and 12 deletions
+9 -2
View File
@@ -398,11 +398,18 @@ struct MD_MapSlot
void *val;
};
typedef struct MD_MapBucket MD_MapBucket;
struct MD_MapBucket
{
MD_MapSlot *first;
MD_MapSlot *last;
};
typedef struct MD_Map MD_Map;
struct MD_Map
{
MD_u64 table_size;
MD_MapSlot **table;
MD_MapBucket *buckets;
MD_u64 bucket_count;
};
//~ Token kinds.