begin kvtable

This commit is contained in:
SowinskiBraeden committed 2026-07-22 11:26:51 -07:00
commit 88948fefef
5 files changed
+132

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
#include <stdio.h>
#include <kv.h>
int main(void)
{
kv_t *table = kv_init(1024);
printf("%p\n", table);
printf("%ld\n", table->capacity);
kv_put(table, "hello", "world");
kv_put(table, "hello", "people");
kv_put(table, "goodbye", "world");
for (int i = 0; i < table->capacity; ++i)
{
if (table->entries[i].key)
{
printf("[%d] %s: %s\n", i, table->entries[i].key, table->entries[i].val);
}
}
}