remove resolved todo

This commit is contained in:
2025-12-03 18:29:03 +01:00
parent 83a8526a78
commit cf7c1ef9ec
-1
View File
@@ -76,7 +76,6 @@ allocator_t allocator_from_borrow(borrow_allocator_t *this);
// with_borrow(foos_allocator) {bar = foo(foos_allocator, my_allocator); } Using // with_borrow(foos_allocator) {bar = foo(foos_allocator, my_allocator); } Using
// the return a keyword in the statement following this macro will cause a // the return a keyword in the statement following this macro will cause a
// guaranteed memory leak. // guaranteed memory leak.
// TODO: simplify!
#define with_borrow(NAME) \ #define with_borrow(NAME) \
for (allocator_t NAME = borrow_allocator_create(); NAME.this != NULL; \ for (allocator_t NAME = borrow_allocator_create(); NAME.this != NULL; \
NAME.this = (allocator_reset(NAME), NULL)) \ NAME.this = (allocator_reset(NAME), NULL)) \