From e02e1403b432f8cd6d07ebbdd235627f20f01cfb Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Sat, 6 Jun 2020 12:30:48 -0700 Subject: small changes to exposure of allocation functions --- sys/cmd/cc/lex.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'sys/cmd/cc/lex.c') diff --git a/sys/cmd/cc/lex.c b/sys/cmd/cc/lex.c index 1396358..0963fb9 100644 --- a/sys/cmd/cc/lex.c +++ b/sys/cmd/cc/lex.c @@ -791,6 +791,24 @@ Nospace: #define PTR_HASH(p) (uintptr)(p) #define PTR_EQUAL(p1, p2) ((uintptr)(p1) == (uintptr)(p2)) +static +void +·free(void* _, void* ptr) { + return free(ptr); +} + +static +void * +·alloc(void* _, uint n, ulong size) { + return malloc(n*size); +} + +static +void * +·calloc(void* _, uint n, ulong size) { + return calloc(n, size); +} + static int moresymtab(SymTab *tab, int n) -- cgit v1.2.1