Skip to content

Commit

Permalink
Update the init function of the arena allocator.
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Oct 9, 2024
1 parent 9f10996 commit 557adb6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/std/core/allocators/arena_allocator.c3
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ struct ArenaAllocator (Allocator)
/**
* Initialize a memory arena for use using the provided bytes.
**/
fn void ArenaAllocator.init(&self, char[] data)
fn ArenaAllocator* ArenaAllocator.init(&self, char[] data)
{
self.data = data;
self.used = 0;
return self;
}

fn void ArenaAllocator.clear(&self)
Expand Down

0 comments on commit 557adb6

Please sign in to comment.