Fix building without a garbage collector
http://hydra.nixos.org/build/6695350
This commit is contained in:
parent
dec2f19502
commit
8d6418d46e
|
@ -177,9 +177,9 @@ struct CompareValues
|
||||||
|
|
||||||
|
|
||||||
#if HAVE_BOEHMGC
|
#if HAVE_BOEHMGC
|
||||||
typedef list<Value *, gc_allocator<Value *> > ValueVector;
|
typedef list<Value *, gc_allocator<Value *> > ValueList;
|
||||||
#else
|
#else
|
||||||
typedef vector<Value *> ValueVector;
|
typedef list<Value *> ValueList;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ static void prim_genericClosure(EvalState & state, Value * * args, Value & v)
|
||||||
throw EvalError("attribute `startSet' required");
|
throw EvalError("attribute `startSet' required");
|
||||||
state.forceList(*startSet->value);
|
state.forceList(*startSet->value);
|
||||||
|
|
||||||
ValueVector workSet;
|
ValueList workSet;
|
||||||
for (unsigned int n = 0; n < startSet->value->list.length; ++n)
|
for (unsigned int n = 0; n < startSet->value->list.length; ++n)
|
||||||
workSet.push_back(startSet->value->list.elems[n]);
|
workSet.push_back(startSet->value->list.elems[n]);
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ static void prim_genericClosure(EvalState & state, Value * * args, Value & v)
|
||||||
/* Construct the closure by applying the operator to element of
|
/* Construct the closure by applying the operator to element of
|
||||||
`workSet', adding the result to `workSet', continuing until
|
`workSet', adding the result to `workSet', continuing until
|
||||||
no new elements are found. */
|
no new elements are found. */
|
||||||
ValueVector res;
|
ValueList res;
|
||||||
// `doneKeys' doesn't need to be a GC root, because its values are
|
// `doneKeys' doesn't need to be a GC root, because its values are
|
||||||
// reachable from res.
|
// reachable from res.
|
||||||
set<Value *, CompareValues> doneKeys;
|
set<Value *, CompareValues> doneKeys;
|
||||||
|
@ -245,7 +245,7 @@ static void prim_genericClosure(EvalState & state, Value * * args, Value & v)
|
||||||
/* Create the result list. */
|
/* Create the result list. */
|
||||||
state.mkList(v, res.size());
|
state.mkList(v, res.size());
|
||||||
unsigned int n = 0;
|
unsigned int n = 0;
|
||||||
foreach (ValueVector::iterator, i, res)
|
foreach (ValueList::iterator, i, res)
|
||||||
v.list.elems[n++] = *i;
|
v.list.elems[n++] = *i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue