libexpr: initGC -> initLibExpr
we'll put more stuff in there shortly. unfortunately.
Change-Id: I74be957469c3dcd5157f999e2cf23b1c668426d8
This commit is contained in:
parent
3dba1d341a
commit
8088927b90
|
@ -144,11 +144,11 @@ static Symbol getName(const AttrName & name, EvalState & state, Env & env)
|
|||
}
|
||||
}
|
||||
|
||||
static bool gcInitialised = false;
|
||||
static bool libexprInitialised = false;
|
||||
|
||||
void initGC()
|
||||
void initLibExpr()
|
||||
{
|
||||
if (gcInitialised) return;
|
||||
if (libexprInitialised) return;
|
||||
|
||||
#if HAVE_BOEHMGC
|
||||
/* Initialise the Boehm garbage collector. */
|
||||
|
@ -191,7 +191,7 @@ void initGC()
|
|||
|
||||
#endif
|
||||
|
||||
gcInitialised = true;
|
||||
libexprInitialised = true;
|
||||
}
|
||||
|
||||
EvalState::EvalState(
|
||||
|
@ -270,7 +270,7 @@ EvalState::EvalState(
|
|||
{
|
||||
countCalls = getEnv("NIX_COUNT_CALLS").value_or("0") != "0";
|
||||
|
||||
assert(gcInitialised);
|
||||
assert(libexprInitialised);
|
||||
|
||||
static_assert(sizeof(Env) <= 16, "environment must be <= 16 bytes");
|
||||
|
||||
|
|
|
@ -135,9 +135,9 @@ std::ostream & operator << (std::ostream & os, const ValueType t);
|
|||
|
||||
|
||||
/**
|
||||
* Initialise the Boehm GC, if applicable.
|
||||
* Initialise the evaluator (including Boehm GC, if applicable).
|
||||
*/
|
||||
void initGC();
|
||||
void initLibExpr();
|
||||
|
||||
|
||||
struct RegexCache;
|
||||
|
|
|
@ -359,7 +359,7 @@ void mainWrapped(int argc, char * * argv)
|
|||
}
|
||||
|
||||
initNix();
|
||||
initGC();
|
||||
initLibExpr();
|
||||
|
||||
#if __linux__
|
||||
if (getuid() == 0) {
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace nix
|
|||
|
||||
TEST(Arguments, lookupFileArg) {
|
||||
initNix();
|
||||
initGC();
|
||||
initLibExpr();
|
||||
|
||||
std::string const unitDataPath = getEnv("_NIX_TEST_UNIT_DATA").value();
|
||||
// Meson should be allowed to pass us a relative path here tbh.
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace nix {
|
|||
public:
|
||||
static void SetUpTestSuite() {
|
||||
LibStoreTest::SetUpTestSuite();
|
||||
initGC();
|
||||
initLibExpr();
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace nix
|
|||
{
|
||||
TEST(ProgressBar, basicStatusRender) {
|
||||
initNix();
|
||||
initGC();
|
||||
initLibExpr();
|
||||
|
||||
setLogFormat(LogFormat::bar);
|
||||
ASSERT_NE(dynamic_cast<ProgressBar *>(logger), nullptr);
|
||||
|
|
Loading…
Reference in a new issue