summaryrefslogtreecommitdiffstats
path: root/jv_dtoa.c
diff options
context:
space:
mode:
authorStephen Dolan <mu@netsoc.tcd.ie>2012-12-18 16:52:47 +0000
committerStephen Dolan <mu@netsoc.tcd.ie>2012-12-18 16:53:51 +0000
commit04daafbde36ab696069a9df17ff85629574491c4 (patch)
tree66bff8def53de1a0f27038d880bd1306dc2ced39 /jv_dtoa.c
parent75421cbfe32ae6428fe08b6ba83f1f7ac0322c33 (diff)
Add wrappers for malloc/realloc/free. See #43.
Diffstat (limited to 'jv_dtoa.c')
-rw-r--r--jv_dtoa.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/jv_dtoa.c b/jv_dtoa.c
index b200c462..251a6916 100644
--- a/jv_dtoa.c
+++ b/jv_dtoa.c
@@ -195,6 +195,11 @@
#include "jv_dtoa.h"
+#include "jv_alloc.h"
+#define MALLOC jv_mem_alloc
+#define FREE jv_mem_free
+
+
#ifndef Long
#define Long long
@@ -572,7 +577,7 @@ void jvp_dtoa_context_free(struct dtoa_context* C) {
while (C->freelist[k]) {
Bigint* v = C->freelist[k];
C->freelist[k] = v->next;
- free(v);
+ FREE(v);
}
}
}