From 60b3369ab24f9bd2a4a6d638ab1b3013ebc29814 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Thu, 20 Jun 2024 16:00:34 +0100 Subject: pass State *S everywhere contains changes from a million years ago that i don't remember much about --- mem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mem.c') diff --git a/mem.c b/mem.c index d464f7d..225834d 100644 --- a/mem.c +++ b/mem.c @@ -3,7 +3,7 @@ #include #include -void *M(void *p, size_t old, size_t new) { +void *M(State *S, void *p, size_t old, size_t new) { if (new == 0) { free(p); return NULL; @@ -17,8 +17,8 @@ void *M(void *p, size_t old, size_t new) { } } -Obj *alloc_obj(size_t sz, ObjTy oty) { - Obj *o = M(NULL, 0, sz); +Obj *alloc_obj(State *S, size_t sz, ObjTy oty) { + Obj *o = M(S, NULL, 0, sz); o->oty = oty; return o; } -- cgit v1.2.3