This commit is contained in:
2025-12-10 07:58:23 +01:00
parent 2c4646a0ee
commit 260dabfbf0
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ void allocator_reset(allocator_t this);
#define allocator_resize(this, old_ptr, bytes) allocator_resize_func(this, old_ptr, bytes, __FILE__, __LINE__) #define allocator_resize(this, old_ptr, bytes) allocator_resize_func(this, old_ptr, bytes, __FILE__, __LINE__)
// forever_allocator /////////////////////////////////////////////////////////// // forever_allocator ///////////////////////////////////////////////////////////
allocator_t forever_allocator(); allocator_t forever_allocator(void);
// buffer_allocator //////////////////////////////////////////////////////////// // buffer_allocator ////////////////////////////////////////////////////////////
typedef struct buffer_allocator { typedef struct buffer_allocator {
+1 -1
View File
@@ -18,7 +18,7 @@ static const allocator_vtbl_t forever_vtbl = {
.reset = forever_no_op, .reset = forever_no_op,
}; };
allocator_t forever_allocator() { allocator_t forever_allocator(void) {
return (allocator_t) { return (allocator_t) {
.this=NULL, .this=NULL,
.vtbl=&forever_vtbl, .vtbl=&forever_vtbl,
+1 -1
View File
@@ -60,7 +60,7 @@ Test(dynamic_arrays, contains) {
for ( size_t y = 0; y < 1000; y++ ) { for ( size_t y = 0; y < 1000; y++ ) {
for ( size_t i = 0; i < 100; i++ ) { for ( size_t i = 0; i < 100; i++ ) {
if (!arr_contains(numbers, int, i)) { if (!arr_contains(numbers, &(int){i})) {
arr_append(numbers, i); arr_append(numbers, i);
} }
} }