fix invalid syntax not being called on an invalid assignment

This commit is contained in:
2025-06-02 00:13:24 +01:00
parent d2518afb8e
commit e4c2af3cc7
7 changed files with 131 additions and 569 deletions

View File

@@ -1,15 +1,17 @@
#ifndef DARRAY_H
#define DARRAY_H
#include <stddef.h> // for size_t
#include <stdbool.h>
#include <stddef.h> // for size_t
#define CHUNK_SIZE 16
typedef struct {
void *data;
size_t element_size;
size_t size;
size_t capacity;
void *data;
size_t element_size;
size_t size;
size_t capacity;
bool resizable;
} DArray;
// Initializes the dynamic_array
@@ -30,4 +32,6 @@ void darray_free(DArray *arr, void (*free_data)(void *));
// Resizes the array to a new size (internal use, but exposed)
void darray_resize(DArray *arr, size_t new_size);
DArray darray_slice(DArray *arr, size_t start, size_t end);
#endif // DARRAY_H