comparison dowa/d_memory.c @ 6:1e61008b9980

[Seobeo] Updated seobeo so that API is more opinionated. Added my webpage./build.sh
author June Park <parkjune1995@gmail.com>
date Mon, 29 Sep 2025 16:00:44 -0700
parents 3e12bf044589
children fa2b8af609d9
comparison
equal deleted inserted replaced
5:3e12bf044589 6:1e61008b9980
263 if (Dowa_HashMap_Cache_Folder(p_child_map, fullpath) == -1) 263 if (Dowa_HashMap_Cache_Folder(p_child_map, fullpath) == -1)
264 { 264 {
265 perror("Dowa_HashMap_Cache_Folder"); 265 perror("Dowa_HashMap_Cache_Folder");
266 return -1; 266 return -1;
267 } 267 }
268 void *value = Dowa_HashMap_Get(p_child_map, "bar.txt"); 268
269 269 // Should not copy as we malloced already.
270 // Should not copy as we malloced alredy.
271 if (Dowa_HashMap_PushValueWithTypeNoCopy(map, entry->d_name, p_child_map, 270 if (Dowa_HashMap_PushValueWithTypeNoCopy(map, entry->d_name, p_child_map,
272 sizeof(p_child_map), DOWA_HASH_MAP_TYPE_HASHMAP) == -1) 271 sizeof(p_child_map), DOWA_HASH_MAP_TYPE_HASHMAP) == -1)
273 { 272 {
274 Dowa_HashMap_Free(map); 273 Dowa_HashMap_Free(p_child_map);
275 return -1; 274 return -1;
276 } 275 }
277 } 276 }
278 } 277 }
279 closedir(dir); 278 closedir(dir);