Remove array structs (#10)

Reviewed-on: #10
This commit was merged in pull request #10.
This commit is contained in:
2026-01-02 16:50:52 +00:00
parent f3ee1ee468
commit c2a156e256
16 changed files with 441 additions and 357 deletions

View File

@@ -275,15 +275,15 @@ void wapp_str8_to_upper(Str8 *dst, Str8RO *src) {
}
}
void wapp_str8_from_bytes(Str8 *dst, const U8Array *src) {
void wapp_str8_from_bytes(Str8 *dst, const U8Array src) {
wapp_debug_assert(src != NULL && dst != NULL, "`dst` and `src` should not be NULL");
u64 size = src->count * src->item_size;
u64 size = wapp_array_count(src) * wapp_array_item_size(src);
wapp_debug_assert(dst->capacity >= size, "`dst` does not have enough capacity");
dst->size = size;
memcpy(dst->buf, src->items, size);
memcpy(dst->buf, src, size);
}
i64 wapp_str8_find(Str8RO *str, Str8RO substr) {