aboutsummaryrefslogtreecommitdiff
path: root/json.c
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2025-02-11 06:33:33 +0100
committerMartin Kagamino Lehoux <martin@lehoux.net>2025-02-11 06:33:33 +0100
commit92a97df033086d0ed88c38ad1efe4a2a023eb5fe (patch)
treeb1dfd84872ec9409a9282f4359b59be830d1acec /json.c
parent10379fdde9fa5e94a955fe35f14e5b35de2a0e5d (diff)
feat(json): Reduce int memory usage
Diffstat (limited to 'json.c')
-rw-r--r--json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/json.c b/json.c
index 6948edf..cf40634 100644
--- a/json.c
+++ b/json.c
@@ -14,7 +14,7 @@ typedef struct {
} parse_integer_result;
parse_integer_result parse_integer(Arena *a, char *src, uintptr_t pos) {
- int *ints = new (a, int, 16); // TODO: reuse in parsing
+ char ints[16];
int i = 0;
while (isdigit(src[pos + i])) {
int val = (src[pos + i] - '0');