No codegen doubly-linked list (#8)

Reviewed-on: #8
Co-authored-by: Abdelrahman <said.abdelrahman89@gmail.com>
Co-committed-by: Abdelrahman <said.abdelrahman89@gmail.com>
This commit was merged in pull request #8.
This commit is contained in:
2025-12-17 03:53:13 +00:00
committed by Abdelrahman Said
parent 4b95a681d4
commit 4ea30f0762
43 changed files with 551 additions and 8249 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;