changeset 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 a0f0ad5e42eb
files dowa/d_memory.c dowa/dowa.h dowa/dowa_test.c seobeo/os/s_linux_edge.c seobeo/os/s_macos_edge.c seobeo/s_web.c seobeo/seobeo_internal.h
diffstat 7 files changed, 98 insertions(+), 98 deletions(-) [+]
line wrap: on
line diff
--- a/dowa/d_memory.c	Tue Dec 23 15:18:46 2025 -0800
+++ b/dowa/d_memory.c	Wed Dec 24 06:22:59 2025 -0800
@@ -1,9 +1,9 @@
 #include "dowa.h"
 
 // --- Arena --- //
-Dowa_PArena Dowa_Arena_Create(size_t capacity)
+Dowa_Arena *Dowa_Arena_Create(size_t capacity)
 {
-  Dowa_PArena p_arena = malloc(sizeof(Dowa_Arena));
+  Dowa_Arena *p_arena = malloc(sizeof(Dowa_Arena));
   if (p_arena == NULL)
   {
     perror("malloc");
@@ -21,7 +21,7 @@
   return p_arena;
 }
 
-void *Dowa_Arena_Allocate(Dowa_PArena p_arena, size_t size)
+void *Dowa_Arena_Allocate(Dowa_Arena *p_arena, size_t size)
 {
   if (!p_arena || !p_arena->buffer || size == 0)
     return NULL;
@@ -35,7 +35,7 @@
   return currnet_ptr;
 }
 
-void Dowa_Arena_Destroy(Dowa_PArena p_arena)
+void Dowa_Arena_Destroy(Dowa_Arena *p_arena)
 {
   if (!p_arena) return;
 
@@ -44,7 +44,7 @@
   Dowa_Free(p_arena);
 }
 
-void *Dowa_Arena_Copy(Dowa_PArena p_arena, const void *src, size_t size)
+void *Dowa_Arena_Copy(Dowa_Arena *p_arena, const void *src, size_t size)
 {
   if (p_arena == NULL || src == NULL || size == 0)
     return NULL;
@@ -57,28 +57,28 @@
   return dest;
 }
 
-void Dowa_Arena_Reset(Dowa_PArena p_arena)
+void Dowa_Arena_Reset(Dowa_Arena *p_arena)
 {
   if (!p_arena) return;
   p_arena->offset = 0;
 }
 
-size_t Dowa_Arena_Get_Used(Dowa_PArena p_arena)
+size_t Dowa_Arena_Get_Used(Dowa_Arena *p_arena)
 {
   if (!p_arena) return 0;
   return p_arena->offset;
 }
 
-size_t Dowa_Arena_Get_Remaining(Dowa_PArena p_arena)
+size_t Dowa_Arena_Get_Remaining(Dowa_Arena *p_arena)
 {
   if (!p_arena) return 0;
   return p_arena->capacity - p_arena->offset;
 }
 
 // --- HashMap --- //
-Dowa_PHashMap Dowa_HashMap_Create(size_t capacity)
+Dowa_HashMap *Dowa_HashMap_Create(size_t capacity)
 {
-  Dowa_PHashMap p_hash_map;
+  Dowa_HashMap *p_hash_map;
   p_hash_map = malloc(sizeof(Dowa_HashMap));
   if (p_hash_map == NULL)
   {
@@ -96,7 +96,7 @@
   return p_hash_map;
 }
 
-Dowa_PHashMap Dowa_HashMap_Create_With_Arena(size_t capacity, Dowa_PArena p_arena)
+Dowa_HashMap *Dowa_HashMap_Create_With_Arena(size_t capacity, Dowa_Arena *p_arena)
 {
   if (p_arena == NULL)
   {
@@ -104,7 +104,7 @@
     return Dowa_HashMap_Create(capacity);
   }
 
-  Dowa_PHashMap p_hash_map;
+  Dowa_HashMap *p_hash_map;
   p_hash_map = Dowa_Arena_Allocate(p_arena, sizeof(Dowa_HashMap));
   if (p_hash_map == NULL)
   {
@@ -122,7 +122,7 @@
   return p_hash_map;
 }
 
-void Dowa_HashMap_Destroy(Dowa_PHashMap p_hash_map)
+void Dowa_HashMap_Destroy(Dowa_HashMap *p_hash_map)
 {
   if (!p_hash_map) return;
 
@@ -134,8 +134,8 @@
   }
   else
   {
-    Dowa_PHashEntry entry;
-    Dowa_PHashEntry next;
+    Dowa_HashEntry *entry;
+    Dowa_HashEntry *next;
     if (p_hash_map->entries)
     {
       for (int idx=0; idx<p_hash_map->capacity; idx++)
@@ -156,7 +156,7 @@
   Dowa_Free(p_hash_map);
 }
 
-int32 Dowa_HashMap_Get_Position(Dowa_PHashMap p_hash_map, const char *key)
+int32 Dowa_HashMap_Get_Position(Dowa_HashMap *p_hash_map, const char *key)
 {
   if (!p_hash_map || !key)
     return -1;
@@ -170,13 +170,13 @@
   return hash_val % p_hash_map->capacity;
 }
 
-void *Dowa_HashMap_Get(Dowa_PHashMap p_hash_map, const char *key)
+void *Dowa_HashMap_Get(Dowa_HashMap *p_hash_map, const char *key)
 {
   if (!p_hash_map || !key)
     return NULL;
 
   int idx = Dowa_HashMap_Get_Position(p_hash_map, key);
-  Dowa_PHashEntry entry = p_hash_map->entries[idx];
+  Dowa_HashEntry *entry = p_hash_map->entries[idx];
 
   while (entry)
   {
@@ -191,7 +191,7 @@
 }
 
 
-int32 Dowa_HashMap_Push_Value_With_Type_NoCopy(Dowa_PHashMap p_hash_map, const char *key,
+int32 Dowa_HashMap_Push_Value_With_Type_NoCopy(Dowa_HashMap *p_hash_map, const char *key,
                                                void *value, size_t value_size,
                                                Dowa_HashMap_ValueType type)
 {
@@ -199,8 +199,8 @@
     return -1;
 
   int idx = Dowa_HashMap_Get_Position(p_hash_map, key);
-  Dowa_PHashEntry entry = p_hash_map->entries[idx];
-  Dowa_PHashEntry prev = NULL;
+  Dowa_HashEntry *entry = p_hash_map->entries[idx];
+  Dowa_HashEntry *prev = NULL;
 
   // Old key
   while (entry)
@@ -261,7 +261,7 @@
   return 0;
 }
 
-int32 Dowa_HashMap_Push_Value_With_Type(Dowa_PHashMap p_hash_map, const char *key,
+int32 Dowa_HashMap_Push_Value_With_Type(Dowa_HashMap *p_hash_map, const char *key,
                                         void *value, size_t value_size,
                                         Dowa_HashMap_ValueType type)
 {
@@ -269,8 +269,8 @@
     return -1;
 
   int idx = Dowa_HashMap_Get_Position(p_hash_map, key);
-  Dowa_PHashEntry entry = p_hash_map->entries[idx];
-  Dowa_PHashEntry prev = NULL;
+  Dowa_HashEntry *entry = p_hash_map->entries[idx];
+  Dowa_HashEntry *prev = NULL;
 
   // Check for existing key
   while (entry)
@@ -324,19 +324,19 @@
   return 0;
 }
 
-void Dowa_HashMap_Push_Value(Dowa_PHashMap p_hash_map, const char *key, void *value, size_t value_size)
+void Dowa_HashMap_Push_Value(Dowa_HashMap *p_hash_map, const char *key, void *value, size_t value_size)
 {
   Dowa_HashMap_Push_Value_With_Type(p_hash_map, key, value, value_size, DOWA_HASH_MAP_TYPE_BUFFER);
 }
 
-void Dowa_HashMap_Pop_Key(Dowa_PHashMap p_hash_map, const char *key)
+void Dowa_HashMap_Pop_Key(Dowa_HashMap *p_hash_map, const char *key)
 {
   if (!p_hash_map || !key)
     return;
 
   int idx = Dowa_HashMap_Get_Position(p_hash_map, key);
-  Dowa_PHashEntry entry = p_hash_map->entries[idx];
-  Dowa_PHashEntry prev = NULL;
+  Dowa_HashEntry *entry = p_hash_map->entries[idx];
+  Dowa_HashEntry *prev = NULL;
 
   while (entry)
   {
@@ -363,13 +363,13 @@
   }
 }
 
-boolean Dowa_HashMap_Has_Key(Dowa_PHashMap p_hash_map, const char *key)
+boolean Dowa_HashMap_Has_Key(Dowa_HashMap *p_hash_map, const char *key)
 {
   if (!p_hash_map || !key)
     return FALSE;
 
   int idx = Dowa_HashMap_Get_Position(p_hash_map, key);
-  Dowa_PHashEntry entry = p_hash_map->entries[idx];
+  Dowa_HashEntry *entry = p_hash_map->entries[idx];
 
   while (entry)
   {
@@ -381,7 +381,7 @@
   return FALSE;
 }
 
-void Dowa_HashMap_Clear(Dowa_PHashMap p_hash_map)
+void Dowa_HashMap_Clear(Dowa_HashMap *p_hash_map)
 {
   if (!p_hash_map) return;
 
@@ -392,8 +392,8 @@
   }
   else
   {
-    Dowa_PHashEntry entry;
-    Dowa_PHashEntry next;
+    Dowa_HashEntry *entry;
+    Dowa_HashEntry *next;
     if (p_hash_map->entries)
     {
       for (int idx=0; idx<p_hash_map->capacity; idx++)
@@ -414,13 +414,13 @@
   p_hash_map->current_capacity = 0;
 }
 
-uint32 Dowa_HashMap_Get_Count(Dowa_PHashMap p_hash_map)
+uint32 Dowa_HashMap_Get_Count(Dowa_HashMap *p_hash_map)
 {
   if (!p_hash_map) return 0;
   return p_hash_map->current_capacity;
 }
 
-void Dowa_HashMap_Print(Dowa_PHashMap map)
+void Dowa_HashMap_Print(Dowa_HashMap *map)
 {
   if (!map)
   {
@@ -431,7 +431,7 @@
   printf("\n-----------\n\n");
   for (size_t i = 0; i < map->capacity; ++i)
   {
-    Dowa_PHashEntry e = map->entries[i];
+    Dowa_HashEntry *e = map->entries[i];
     while (e) 
     {
       if (!e) break;
@@ -450,7 +450,7 @@
         break;
         case DOWA_HASH_MAP_TYPE_STRING:
         {
-          printf("%s\n", (char*)e->buffer);
+          printf("%.*s\n", (int)e->capacity, (char*)e->buffer);
         }
         break;
         case DOWA_HASH_MAP_TYPE_HASHMAP:
@@ -475,7 +475,7 @@
 }
 
 #ifdef DIRECTORY
-int Dowa_HashMap_Cache_Folder(Dowa_PHashMap p_hash_map, const char *folder_path)
+int Dowa_HashMap_Cache_Folder(Dowa_HashMap *p_hash_map, const char *folder_path)
 {
   if (!p_hash_map || !folder_path)
     return -1;
@@ -527,7 +527,7 @@
     else if (S_ISDIR(st.st_mode))
     {
       // TODO: Adjust the sizes of the recursive map?
-      Dowa_PHashMap p_child_map = Dowa_HashMap_Create_With_Arena(100, p_hash_map->p_arena); 
+      Dowa_HashMap *p_child_map = Dowa_HashMap_Create_With_Arena(100, p_hash_map->p_arena); 
       if (!p_child_map)
       {
         perror("Dowa_HashMap_Create");
--- a/dowa/dowa.h	Tue Dec 23 15:18:46 2025 -0800
+++ b/dowa/dowa.h	Wed Dec 24 06:22:59 2025 -0800
@@ -45,22 +45,22 @@
   char   *buffer;
   size_t  offset;
   size_t  capacity;
-} Dowa_Arena, *Dowa_PArena;
+} Dowa_Arena;
 
 /* Creates a new arena with the specified capacity (in bytes). Returns a pointer to the arena, or NULL on failure. */
-extern       Dowa_PArena Dowa_Arena_Create(size_t capacity);
+extern Dowa_Arena *Dowa_Arena_Create(size_t capacity);
 /* Allocates a block of memory of the given size from the arena. Returns pointer to the allocated memory, or NULL if there is insufficient space. */
-extern void *Dowa_Arena_Allocate(Dowa_PArena arena, size_t size);
+extern void       *Dowa_Arena_Allocate(Dowa_Arena *arena, size_t size);
 /* Destroys the arena and frees its underlying memory block.*/
-extern void  Dowa_Arena_Destroy(Dowa_PArena arena);
+extern void        Dowa_Arena_Destroy(Dowa_Arena *arena);
 /* Strdup but saves within the arena */
-extern void *Dowa_Arena_Copy(Dowa_PArena p_arena, const void *src, size_t size);
+extern void       *Dowa_Arena_Copy(Dowa_Arena *p_arena, const void *src, size_t size);
 /* Resets the arena offset to 0, allowing reuse without freeing */
-extern void  Dowa_Arena_Reset(Dowa_PArena p_arena);
+extern void        Dowa_Arena_Reset(Dowa_Arena *p_arena);
 /* Returns the current number of bytes allocated in the arena */
-extern size_t Dowa_Arena_Get_Used(Dowa_PArena p_arena);
+extern size_t      Dowa_Arena_Get_Used(Dowa_Arena *p_arena);
 /* Returns the remaining capacity in bytes */
-extern size_t Dowa_Arena_Get_Remaining(Dowa_PArena p_arena);
+extern size_t      Dowa_Arena_Get_Remaining(Dowa_Arena *p_arena);
 
 
 // --- HashMap --- //
@@ -72,44 +72,44 @@
 } Dowa_HashMap_ValueType;
 
 typedef struct Dowa_HashEntry {
-  char                  *key;
-  void                  *buffer;
-  size_t                 capacity;
-  Dowa_HashMap_ValueType type;
-  struct Dowa_HashEntry *next; 
-} Dowa_HashEntry, *Dowa_PHashEntry;
+  char                   *key;
+  void                   *buffer;
+  size_t                  capacity;
+  Dowa_HashMap_ValueType  type;
+  struct Dowa_HashEntry  *next; 
+} Dowa_HashEntry;
 
 typedef struct {
-    Dowa_PHashEntry *entries;
+    Dowa_HashEntry **entries;
     size_t           capacity;
     uint32           current_capacity;
-    Dowa_PArena      p_arena;
-} Dowa_HashMap, *Dowa_PHashMap;
+    Dowa_Arena      *p_arena;
+} Dowa_HashMap;
 
 /* Creates a new hashmap with the given initial capacity. Returns pointer to the hashmap, or NULL on failure. */
-extern Dowa_PHashMap Dowa_HashMap_Create(size_t capacity);
+extern Dowa_HashMap *Dowa_HashMap_Create(size_t capacity);
 /* Creates a new hashmap with the given initial capacity, using the provided arena for all internal allocations. Returns pointer to the hashmap, or NULL on failure. */
-extern Dowa_PHashMap Dowa_HashMap_Create_With_Arena(size_t capacity, Dowa_PArena arena);
+extern Dowa_HashMap *Dowa_HashMap_Create_With_Arena(size_t capacity, Dowa_Arena *arena);
 /* Destroys the hashmap and frees all associated memory */
-extern void          Dowa_HashMap_Destroy(Dowa_PHashMap p_hash_map);
+extern void          Dowa_HashMap_Destroy(Dowa_HashMap *p_hash_map);
 /* Returns the index of the entry for the specified key, or -1 if the key is not found. */
-extern int32         Dowa_HashMap_Get_Position(Dowa_PHashMap p_hash_map, const char *key);
+extern int32         Dowa_HashMap_Get_Position(Dowa_HashMap *p_hash_map, const char *key);
 /* Retrieves the value buffer for the specified key, or NULL if the key does not exist. */
-extern void         *Dowa_HashMap_Get(Dowa_PHashMap p_hash_map, const char *key);
+extern void         *Dowa_HashMap_Get(Dowa_HashMap *p_hash_map, const char *key);
 /* Inserts a copy of the given value into the hashmap under the specified key. Uses DOWA_HASH_MAP_TYPE_BUFFER as the entry type. */
-extern void          Dowa_HashMap_Push_Value(Dowa_PHashMap p_hash_map, const char *key, void *value, size_t value_size);
+extern void          Dowa_HashMap_Push_Value(Dowa_HashMap *p_hash_map, const char *key, void *value, size_t value_size);
 /* Inserts a copy of the given value with the specified type into the hashmap under the key. Returns the index of the new entry, or -1 on failure. */
-extern int32         Dowa_HashMap_Push_Value_With_Type(Dowa_PHashMap p_hash_map, const char *key, void *value, size_t value_size, Dowa_HashMap_ValueType type);
+extern int32         Dowa_HashMap_Push_Value_With_Type(Dowa_HashMap *p_hash_map, const char *key, void *value, size_t value_size, Dowa_HashMap_ValueType type);
 /* Inserts a value pointer into the hashmap under the specified key without copying data. The caller retains ownership of the pointer. Returns the entry index, or -1 on failure. */
-extern int32         Dowa_HashMap_Push_Value_With_Type_NoCopy(Dowa_PHashMap p_hash_map, const char *key, void *value, size_t value_size, Dowa_HashMap_ValueType type);
+extern int32         Dowa_HashMap_Push_Value_With_Type_NoCopy(Dowa_HashMap *p_hash_map, const char *key, void *value, size_t value_size, Dowa_HashMap_ValueType type);
 /* Removes the entry with the specified key from the hashmap and frees its data if owned. */
-extern void          Dowa_HashMap_Pop_Key(Dowa_PHashMap p_hash_map, const char *key);
+extern void          Dowa_HashMap_Pop_Key(Dowa_HashMap *p_hash_map, const char *key);
 /* Returns TRUE if the key exists in the hashmap, FALSE otherwise. */
-extern boolean       Dowa_HashMap_Has_Key(Dowa_PHashMap p_hash_map, const char *key);
+extern boolean       Dowa_HashMap_Has_Key(Dowa_HashMap *p_hash_map, const char *key);
 /* Removes all entries from the hashmap without destroying it. */
-extern void          Dowa_HashMap_Clear(Dowa_PHashMap p_hash_map);
+extern void          Dowa_HashMap_Clear(Dowa_HashMap *p_hash_map);
 /* Returns the number of entries currently in the hashmap. */
-extern uint32        Dowa_HashMap_Get_Count(Dowa_PHashMap p_hash_map);
+extern uint32        Dowa_HashMap_Get_Count(Dowa_HashMap *p_hash_map);
 
 // --- String manipuliation -- //
 // Splice string from start to end
@@ -119,10 +119,10 @@
 
 // --- Utility Functions --- //
 /* Prints all entries in the hashmap to stdout for debugging purposes. */
-extern void          Dowa_HashMap_Print(Dowa_PHashMap map);
+extern void          Dowa_HashMap_Print(Dowa_HashMap *map);
 #ifdef DIRECTORY
 /* Loads all files from the specified folder into the hashmap. Uses file names as keys and file contents as values. Returns 0 on success, or -1 on failure. */
-extern int           Dowa_HashMap_Cache_Folder(Dowa_PHashMap map, const char *folder_path);
+extern int           Dowa_HashMap_Cache_Folder(Dowa_HashMap *map, const char *folder_path);
 #endif
 
 
--- 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";
 
--- a/seobeo/os/s_linux_edge.c	Tue Dec 23 15:18:46 2025 -0800
+++ b/seobeo/os/s_linux_edge.c	Wed Dec 24 06:22:59 2025 -0800
@@ -70,7 +70,7 @@
 void Seobeo_Web_Edge(
     Seobeo_PHandle p_server_handle,
     int thread_count,
-    Dowa_PHashMap p_html_cache)
+    Dowa_HashMap *p_html_cache)
 {
   pthread_attr_t attr;
   pthread_attr_init(&attr);
@@ -93,7 +93,7 @@
 }
 
 
-void Seobeo_Web_Edge_2(Seobeo_PHandle p_handle_server, Dowa_PHashMap cache)
+void Seobeo_Web_Edge_2(Seobeo_PHandle p_handle_server, Dowa_HashMap *cache)
 {
   const int MAX_EVENTS = 1024;
   struct epoll_event events[MAX_EVENTS];
@@ -117,7 +117,7 @@
     return;
   }
 
-  Dowa_PHashMap handles = Dowa_HashMap_Create(1024);
+  Dowa_HashMap *handles = Dowa_HashMap_Create(1024);
   snprintf(keybuf, sizeof(keybuf), "%d", p_handle_server->socket);
   Dowa_HashMap_Push_Value(handles, keybuf, p_handle_server, sizeof(p_handle_server));
 
--- a/seobeo/os/s_macos_edge.c	Tue Dec 23 15:18:46 2025 -0800
+++ b/seobeo/os/s_macos_edge.c	Wed Dec 24 06:22:59 2025 -0800
@@ -72,7 +72,7 @@
 void  Seobeo_Web_Edge(
     Seobeo_PHandle p_server_handle,
     int            thread_count,
-    Dowa_PHashMap  p_html_cache)
+    Dowa_HashMap  *p_html_cache)
 {
   pthread_attr_t attr;
   pthread_attr_init(&attr);
--- a/seobeo/s_web.c	Tue Dec 23 15:18:46 2025 -0800
+++ b/seobeo/s_web.c	Wed Dec 24 06:22:59 2025 -0800
@@ -55,22 +55,22 @@
   );
 }
 
-void Seobeo_Web_HandleClientRequest(Seobeo_PHandle p_cli_handle,
-                                    Dowa_PHashMap p_html_cache)
+void Seobeo_Web_HandleClientRequest(Seobeo_PHandle  p_cli_handle,
+                                    Dowa_HashMap   *p_html_cache)
 {
   printf("p_cli_handle: %p", p_cli_handle);
-  Dowa_PHashEntry entry = NULL;
-  Dowa_PHashMap p_current = p_html_cache;
+  Dowa_HashEntry *entry = NULL;
+  Dowa_HashMap *p_current = p_html_cache;
   char *slash;
 
-  Dowa_PArena p_response_arena = Dowa_Arena_Create(1*1024*1024);
+  Dowa_Arena *p_response_arena = Dowa_Arena_Create(1*1024*1024);
   if (!p_response_arena) { perror("Dowa_Arena_Initialize"); goto clean_up; }
 
   void *p_response_header = Dowa_Arena_Allocate(p_response_arena, (size_t)2048);
   if (!p_response_header) { perror("Dowa_Arena_Allocate"); goto clean_up; }
 
   // Parse request headers into hashmap
-  Dowa_PHashMap p_req_map = Dowa_HashMap_Create_With_Arena(100, p_response_arena);
+  Dowa_HashMap *p_req_map = Dowa_HashMap_Create_With_Arena(100, p_response_arena);
   if (Seobeo_Web_Header_Parse(p_cli_handle, p_req_map) != 0)
   {
     Seobeo_Web_Header_Generate(p_response_header,
@@ -101,7 +101,7 @@
   }
 
   // --- Separate GET map for caching or routing ---
-  Dowa_PHashMap p_get_map = Dowa_HashMap_Create(64);
+  Dowa_HashMap *p_get_map = Dowa_HashMap_Create(64);
   if (!p_get_map)
   {
     perror("Dowa_HashMap_Create (p_get_map)");
@@ -260,7 +260,7 @@
 }
 
 
-int Seobeo_Web_Header_Parse(Seobeo_PHandle p_handle, Dowa_PHashMap map)
+int Seobeo_Web_Header_Parse(Seobeo_PHandle p_handle, Dowa_HashMap *map)
 {
   // 1) Fill read_buffer until we see "\r\n\r\n"
   while (1)
@@ -316,7 +316,7 @@
   if (query_str && *query_str)
   {
     // create nested map for GET params
-    Dowa_PHashMap p_query_map = Dowa_HashMap_Create_With_Arena(100, map->p_arena);
+    Dowa_HashMap *p_query_map = Dowa_HashMap_Create_With_Arena(100, map->p_arena);
 
     char *cur = query_str;
     while (cur && *cur)
@@ -369,7 +369,7 @@
   }
 
   // int qp = Dowa_HashMap_Get_Position(map, "QueryParams");
-  // Dowa_PHashEntry p_qp_entry = map->entries[qp];
+  // Dowa_HashEntry *p_qp_entry = map->entries[qp];
   // printf("query param key: %s\n", p_qp_entry->key);
   // printf("query param value: %s\n",(char *)Dowa_HashMap_Get(p_qp_entry->buffer, "hello"));
 
@@ -418,7 +418,7 @@
 
   // 4) If Content-Length was provided, read that much body
   int content_length_pos = Dowa_HashMap_Get_Position(map, "Content-Length");
-  Dowa_PHashEntry p_content_length_entry = map->entries[content_length_pos];
+  Dowa_HashEntry *p_content_length_entry = map->entries[content_length_pos];
   if (p_content_length_entry)
   {
     size_t body_len = atoi((char*)p_content_length_entry->buffer);
@@ -461,7 +461,7 @@
     Seobeo_ServerMode mode,
     int                thread_count)
 {
-  Dowa_PHashMap p_html_cache = Dowa_HashMap_Create(200);
+  Dowa_HashMap *p_html_cache = Dowa_HashMap_Create(200);
   if (Dowa_HashMap_Cache_Folder(p_html_cache,
                                 folder_path) != 0)
   {
@@ -522,7 +522,7 @@
     return -1;
   }
 
-  Dowa_PArena p_request_arena = Dowa_Arena_Create(1 * 1024 * 1024);
+  Dowa_Arena *p_request_arena = Dowa_Arena_Create(1 * 1024 * 1024);
   if (!p_request_arena) { perror("Dowa_Arena_Create"); return -1; }
 
   void *p_request_header = Dowa_Arena_Allocate(p_request_arena, 4096);
--- a/seobeo/seobeo_internal.h	Tue Dec 23 15:18:46 2025 -0800
+++ b/seobeo/seobeo_internal.h	Wed Dec 24 06:22:59 2025 -0800
@@ -44,7 +44,7 @@
 
 typedef struct {
   Seobeo_PHandle  srv;
-  Dowa_PHashMap   cache;
+  Dowa_HashMap   *cache;
 } WorkerArgs;
 
 typedef enum {
@@ -56,10 +56,10 @@
 
 
 // --- Parse Header into Dowa Map ---//
-extern int            Seobeo_Web_Header_Parse(Seobeo_PHandle p_handle, Dowa_PHashMap map);
+extern int            Seobeo_Web_Header_Parse(Seobeo_PHandle p_handle, Dowa_HashMap *map);
 
 // --- Handle Request --- //
-extern void           Seobeo_Web_HandleClientRequest(Seobeo_PHandle cli, Dowa_PHashMap p_html_cache);
+extern void           Seobeo_Web_HandleClientRequest(Seobeo_PHandle cli, Dowa_HashMap *p_html_cache);
 
 // --- SSL --- //
 extern void           Seobeo_Web_SSL_Init();
@@ -67,8 +67,8 @@
 
 // --- Serving using Edge --- //
 extern void          *Seobeo_Web_Edge_Worker(void *vargs); 
-extern void           Seobeo_Web_Edge(Seobeo_PHandle p_server_handle, int thread_count, Dowa_PHashMap p_html_cache);
-extern void           Seobeo_Web_Edge_2(Seobeo_PHandle p_server_handle, Dowa_PHashMap p_html_cache);
+extern void           Seobeo_Web_Edge(Seobeo_PHandle p_server_handle, int thread_count, Dowa_HashMap *p_html_cache);
+extern void           Seobeo_Web_Edge_2(Seobeo_PHandle p_server_handle, Dowa_HashMap *p_html_cache);
 
 #endif