Get rid of array structs

This commit is contained in:
2026-01-02 15:38:25 +00:00
parent ed933cce6e
commit e98c877231
12 changed files with 438 additions and 351 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) {