Add generic no codegen dbl list API

This commit is contained in:
2025-12-17 02:52:15 +00:00
parent 4805b183e8
commit 80308172ec
5 changed files with 198 additions and 4166 deletions

View File

@@ -29,7 +29,7 @@ u32 wapp_cpath_join_path(Str8 *dst, const Str8List *parts) {
}
// Handle first node
const Str8Node *first_node = wapp_str8_list_get(parts, 0);
const Str8Node *first_node = wapp_dbl_list_get(Str8, Str8Node, parts, 0);
wapp_str8_copy_str8_capped(dst, first_node->item);
// NOTE (Abdelrahman): Uses a while loop instead of a for loop to get rid of
@@ -106,7 +106,7 @@ Str8 *dirup(const Allocator *allocator, Str8RO *path, u64 levels) {
wapp_str8_push_back(output, absolute ? WAPP_PATH_SEP : '.');
} else {
for (u64 i = 0; i < levels; ++i) {
wapp_str8_list_pop_back(parts);
wapp_dbl_list_pop_back(Str8, Str8Node, parts);
}
u64 alignment = sizeof(void *) * 2;