diff dowa/dowa_test.c @ 65:ecb6ee6a22c3

[Misc] I will no longer drink cool aids of capital P.
author June Park <parkjune1995@gmail.com>
date Wed, 24 Dec 2025 06:22:59 -0800
parents a30944e5719e
children 75de5903355c
line wrap: on
line diff
--- a/dowa/dowa_test.c	Tue Dec 23 15:18:46 2025 -0800
+++ b/dowa/dowa_test.c	Wed Dec 24 06:22:59 2025 -0800
@@ -8,7 +8,7 @@
 int main(void)
 {
   // --- Test Arena Allocator ---
-  Dowa_PArena arena = Dowa_Arena_Create(64);
+  Dowa_Arena *arena = Dowa_Arena_Create(64);
   assert(arena && "Arena creation failed");
 
   char *arena_mem1 = (char *)Dowa_Arena_Allocate(arena, 16);
@@ -25,7 +25,7 @@
   printf("[Arena] destroyed\n\n");
 
   // --- Test HashMap Basic Operations ---
-  Dowa_PHashMap map = Dowa_HashMap_Create(8);
+  Dowa_HashMap *map = Dowa_HashMap_Create(8);
   assert(map && "HashMap_Create failed");
 
   // Push raw buffer (default type: BUFFER)
@@ -37,7 +37,7 @@
   Dowa_HashMap_Push_Value_With_Type(map, "greeting", hello, strlen(hello) + 1, DOWA_HASH_MAP_TYPE_STRING);
 
   // Push nested hashmap (no copy)
-  Dowa_PHashMap inner = Dowa_HashMap_Create(4);
+  Dowa_HashMap *inner = Dowa_HashMap_Create(4);
   Dowa_HashMap_Push_Value(inner, "inner_key", "inner_val", strlen("inner_val") + 1);
   Dowa_HashMap_Push_Value_With_Type_NoCopy(map, "nested", inner, sizeof(inner), DOWA_HASH_MAP_TYPE_HASHMAP);
 
@@ -64,7 +64,7 @@
     printf("[Get greeting] \"%s\"\n", g);
 
     // nested hashmap
-    Dowa_PHashMap ni = Dowa_HashMap_Get(map, "nested");
+    Dowa_HashMap *ni = Dowa_HashMap_Get(map, "nested");
     printf("[Get nested] Inner map contents:\n");
     Dowa_HashMap_Print(ni);
 
@@ -85,8 +85,8 @@
   Dowa_HashMap_Print(map);
 
   // --- Test HashMap with Arena ---
-  Dowa_PArena mapArena = Dowa_Arena_Create(256);
-  Dowa_PHashMap map2 = Dowa_HashMap_Create_With_Arena(8, mapArena);
+  Dowa_Arena *mapArena = Dowa_Arena_Create(256);
+  Dowa_HashMap *map2 = Dowa_HashMap_Create_With_Arena(8, mapArena);
   assert(map2 && "HashMap_Create_With_Arena failed");
   char *test = "bar";