summaryrefslogtreecommitdiff
path: root/mem.c
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-06-20 16:00:34 +0100
committerubq323 <ubq323@ubq323.website>2024-06-20 16:00:34 +0100
commit60b3369ab24f9bd2a4a6d638ab1b3013ebc29814 (patch)
tree3ff8ec7e95ef314266673b1b3d7bedb880a4a5b0 /mem.c
parent9ee73a8459eb2bb58adc29da02de312b7e4e7dca (diff)
pass State *S everywhere
contains changes from a million years ago that i don't remember much about
Diffstat (limited to 'mem.c')
-rw-r--r--mem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mem.c b/mem.c
index d464f7d..225834d 100644
--- a/mem.c
+++ b/mem.c
@@ -3,7 +3,7 @@
#include <stdio.h>
#include <stdlib.h>
-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;
}