latest
This commit is contained in:
@@ -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
@@ -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,
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user