project structure changed for clion

This commit is contained in:
2022-05-08 13:59:28 +03:00
parent 703bd4bef4
commit c6c70c6fcc
46 changed files with 92 additions and 29 deletions

View File

@@ -0,0 +1,22 @@
#include "KeyValuePair.h"
define_Autoarr(KVPair)
// proper way to clear a KVP
void KVPair_free(KVPair p){
free(p.key);
Unitype_free(p.value);
}
// func for KVP array clearing
void Autoarr_free_KVPair(Autoarr_KVPair* ar){
Autoarr_foreach(ar,k,KVPair_free(k));
Autoarr_free(ar);
}
void printkvp(KVPair p){
printf("{\"%s\", ",p.key);
printuni(p.value);
printf("}");
}