From c905d8b0a84877d3cab10d4a8b8ad81895a6500e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 12 Jun 2018 16:16:03 +0200 Subject: [PATCH] GC_malloc -> GC_MALLOC This makes it possible to build with -DGC_DEBUG. --- src/libexpr/eval-inline.hh | 2 +- src/libexpr/eval.cc | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/libexpr/eval-inline.hh b/src/libexpr/eval-inline.hh index ad172c37c..c27116e3b 100644 --- a/src/libexpr/eval-inline.hh +++ b/src/libexpr/eval-inline.hh @@ -83,7 +83,7 @@ inline void * allocBytes(size_t n) { void * p; #if HAVE_BOEHMGC - p = GC_malloc(n); + p = GC_MALLOC(n); #else p = calloc(n, 1); #endif diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 113850bff..e09297546 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -21,12 +21,6 @@ #include #include -#define NEW new (UseGC) - -#else - -#define NEW new - #endif @@ -37,7 +31,7 @@ static char * dupString(const char * s) { char * t; #if HAVE_BOEHMGC - t = GC_strdup(s); + t = GC_STRDUP(s); #else t = strdup(s); #endif @@ -446,7 +440,7 @@ Value * EvalState::addPrimOp(const string & name, string name2 = string(name, 0, 2) == "__" ? string(name, 2) : name; Symbol sym = symbols.create(name2); v->type = tPrimOp; - v->primOp = NEW PrimOp(primOp, arity, sym); + v->primOp = new PrimOp(primOp, arity, sym); staticBaseEnv.vars[symbols.create(name)] = baseEnvDispl; baseEnv.values[baseEnvDispl++] = v; baseEnv.values[0]->attrs->push_back(Attr(sym, v));