From c200dd832789afa298ba45e0b9efdec96c0e92cc Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Sun, 5 Dec 2021 11:55:10 -0800 Subject: Chore: simplified allocator interfaces. I was never happy with the allocator/reallocator split. It was originally designed to accomodate things like arenas that don't free. But the majority of the time you don't care about this. --- src/base/fmt/buffer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/base/fmt/buffer.c') diff --git a/src/base/fmt/buffer.c b/src/base/fmt/buffer.c index 0099e72..e039577 100644 --- a/src/base/fmt/buffer.c +++ b/src/base/fmt/buffer.c @@ -7,7 +7,7 @@ flush(fmt·State *io) char *s; void *heap = io->heap; - mem·Reallocator mem = io->mem; + mem·Allocator mem = io->mem; if(!io->buffer.beg) return 0; @@ -29,7 +29,7 @@ flush(fmt·State *io) } int -fmt·make(mem·Reallocator mem, void *heap, fmt·State *io) +fmt·make(mem·Allocator mem, void *heap, fmt·State *io) { int n; @@ -53,7 +53,7 @@ void fmt·free(fmt·State *io) { void *heap = io->heap; - mem·Reallocator mem = io->mem; + mem·Allocator mem = io->mem; mem.free(heap, io->buffer.beg); io->buffer.beg = io->buffer.cur = io->buffer.end = nil; -- cgit v1.2.1