fixed a lot of broken stuff
This commit is contained in:
@@ -92,7 +92,7 @@ Unitype Hashtable_get(Hashtable* ht, char* key){
|
||||
bool Hashtable_try_get(Hashtable* ht, char* key, Unitype* output){
|
||||
Unitype u=Hashtable_get(ht,key);
|
||||
*output=u;
|
||||
return u.type!=Null;
|
||||
return u.typeId!=kerepTypeId_Null;
|
||||
}
|
||||
|
||||
void Hashtable_addOrSet(Hashtable* ht, char* key, Unitype u){
|
||||
|
||||
@@ -11,8 +11,8 @@ typedef struct Hashtable{
|
||||
uint8 hein; // height=HT_HEIGHTS[hein]
|
||||
Autoarr(KVPair)** rows; // Autoarr[height]
|
||||
} Hashtable;
|
||||
kerepType_declare(Hashtable);
|
||||
kerepType_declare(HashtablePtr);
|
||||
kerepTypeId_declare(kerepTypeId_Hashtable);
|
||||
kerepTypeId_declare(kerepTypeId_HashtablePtr);
|
||||
|
||||
Hashtable* Hashtable_create();
|
||||
void Hashtable_free(Hashtable* ht);
|
||||
|
||||
@@ -11,12 +11,12 @@ typedef struct KVPair{
|
||||
char* key;
|
||||
Unitype value;
|
||||
} KVPair;
|
||||
kerepType_declare(KVPair);
|
||||
kerepType_declare(KVPairPtr);
|
||||
kerepTypeId_declare(kerepTypeId_KVPair);
|
||||
kerepTypeId_declare(kerepTypeId_KVPairPtr);
|
||||
|
||||
Autoarr_declare(KVPair)
|
||||
kerepType_declare(AutoarrKVPair);
|
||||
kerepType_declare(AutoarrKVPairPtr);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrKVPair);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrKVPairPtr);
|
||||
|
||||
// proper way to clear a KVP
|
||||
void KVPair_free(KVPair p);
|
||||
|
||||
Reference in New Issue
Block a user