GC_malloc -> GC_MALLOC
This makes it possible to build with -DGC_DEBUG.
This commit is contained in:
parent
455d1f01d0
commit
c905d8b0a8
|
@ -83,7 +83,7 @@ inline void * allocBytes(size_t n)
|
||||||
{
|
{
|
||||||
void * p;
|
void * p;
|
||||||
#if HAVE_BOEHMGC
|
#if HAVE_BOEHMGC
|
||||||
p = GC_malloc(n);
|
p = GC_MALLOC(n);
|
||||||
#else
|
#else
|
||||||
p = calloc(n, 1);
|
p = calloc(n, 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -21,12 +21,6 @@
|
||||||
#include <gc/gc.h>
|
#include <gc/gc.h>
|
||||||
#include <gc/gc_cpp.h>
|
#include <gc/gc_cpp.h>
|
||||||
|
|
||||||
#define NEW new (UseGC)
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#define NEW new
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,7 +31,7 @@ static char * dupString(const char * s)
|
||||||
{
|
{
|
||||||
char * t;
|
char * t;
|
||||||
#if HAVE_BOEHMGC
|
#if HAVE_BOEHMGC
|
||||||
t = GC_strdup(s);
|
t = GC_STRDUP(s);
|
||||||
#else
|
#else
|
||||||
t = strdup(s);
|
t = strdup(s);
|
||||||
#endif
|
#endif
|
||||||
|
@ -446,7 +440,7 @@ Value * EvalState::addPrimOp(const string & name,
|
||||||
string name2 = string(name, 0, 2) == "__" ? string(name, 2) : name;
|
string name2 = string(name, 0, 2) == "__" ? string(name, 2) : name;
|
||||||
Symbol sym = symbols.create(name2);
|
Symbol sym = symbols.create(name2);
|
||||||
v->type = tPrimOp;
|
v->type = tPrimOp;
|
||||||
v->primOp = NEW PrimOp(primOp, arity, sym);
|
v->primOp = new PrimOp(primOp, arity, sym);
|
||||||
staticBaseEnv.vars[symbols.create(name)] = baseEnvDispl;
|
staticBaseEnv.vars[symbols.create(name)] = baseEnvDispl;
|
||||||
baseEnv.values[baseEnvDispl++] = v;
|
baseEnv.values[baseEnvDispl++] = v;
|
||||||
baseEnv.values[0]->attrs->push_back(Attr(sym, v));
|
baseEnv.values[0]->attrs->push_back(Attr(sym, v));
|
||||||
|
|
Loading…
Reference in a new issue