From a140d00b5cb36a729cbe7d8bcc591472befaa49d Mon Sep 17 00:00:00 2001 From: Linnnus Date: Sat, 12 Apr 2025 00:27:43 +0000 Subject: refactor(core): Rename sand_{new => get}_std_allocator, void parameters This patch just renames the function for getting a std allocator. This matches the terminology used for the page allocator. There aren't actually any (non-global) resources associated with these allocators so the "get" name makes more sense. It also fixes some (potential) issues with empty parameter specifications in sand_get_std_allocator() and sand_get_page_allocator(). Apparently () is not the same as (void)... --- src/unit/test_arena_allocator.c | 2 +- src/unit/test_std_allocator.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/unit') diff --git a/src/unit/test_arena_allocator.c b/src/unit/test_arena_allocator.c index 5a6e3d8..eb0ad33 100644 --- a/src/unit/test_arena_allocator.c +++ b/src/unit/test_arena_allocator.c @@ -8,7 +8,7 @@ SUITE(arena_allocator) { #define RUN_WITH_ARENA(test) \ do { \ - SandAllocator parent = sand_new_std_allocator(); \ + SandAllocator parent = sand_get_std_allocator(); \ SandArena arena = sand_create_arena(&parent); \ SandAllocator a = sand_get_allocator_for_arena(&arena); \ RUN_TEST1(test, &a); \ diff --git a/src/unit/test_std_allocator.c b/src/unit/test_std_allocator.c index e115952..20464db 100644 --- a/src/unit/test_std_allocator.c +++ b/src/unit/test_std_allocator.c @@ -7,7 +7,7 @@ SUITE(std_allocator) { #define RUN_WITH_STD_ALLOCATOR(test) \ do { \ - SandAllocator a = sand_new_std_allocator(); \ + SandAllocator a = sand_get_std_allocator(); \ RUN_TEST1(test, &a); \ } while(0); -- cgit v1.2.3