nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Automatically enable Bohem's GC if available.
[nit.git]
/
lib
/
nit_common.h
diff --git
a/lib/nit_common.h
b/lib/nit_common.h
index
e0b22bf
..
02e3dff
100644
(file)
--- a/
lib/nit_common.h
+++ b/
lib/nit_common.h
@@
-5,6
+5,12
@@
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <string.h>
+#ifdef WITH_LIBGC
+#include <gc/gc.h>
+#define malloc(x) GC_MALLOC((x))
+#define calloc(x,y) GC_MALLOC((x)*(y))
+#endif
+
/* *** Types *** */
typedef int (*fun_t)(int); /* generic function pointer */
typedef unsigned int cid_t; /* class identifier */
/* *** Types *** */
typedef int (*fun_t)(int); /* generic function pointer */
typedef unsigned int cid_t; /* class identifier */