mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Added tables to the scripts, untested
This also has a lot of bugfixing.
This commit is contained in:
@@ -10,7 +10,7 @@ typedef struct Toy_TableEntry { //32 | 64 BITNESS
|
||||
unsigned int psl; //4 | 4
|
||||
} Toy_TableEntry; //20 | 20
|
||||
|
||||
//key-value table (contains = count + tombstones)
|
||||
//key-value table
|
||||
typedef struct Toy_Table { //32 | 64 BITNESS
|
||||
unsigned int capacity; //4 | 4
|
||||
unsigned int count; //4 | 4
|
||||
@@ -26,7 +26,8 @@ TOY_API Toy_Value Toy_lookupTable(Toy_Table** tableHandle, Toy_Value key);
|
||||
TOY_API void Toy_removeTable(Toy_Table** tableHandle, Toy_Value key);
|
||||
|
||||
//NOTE: exposed to skip unnecessary allocations within Toy_Scope
|
||||
TOY_API Toy_Table* Toy_private_adjustTableCapacity(Toy_Table* oldTable, unsigned int newCapacity);
|
||||
TOY_API Toy_Table* Toy_private_adjustTableCapacity(Toy_Table* oldTable, unsigned int newCapacity); //TODO: make it public
|
||||
TOY_API Toy_TableEntry* Toy_private_lookupTableEntryPtr(Toy_Table** tableHandle, Toy_Value key); //TODO: make it public?
|
||||
|
||||
//some useful sizes, could be swapped out as needed
|
||||
#ifndef TOY_TABLE_INITIAL_CAPACITY
|
||||
|
||||
Reference in New Issue
Block a user