1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 12:41:15 +02:00

nix-expr: remove EvalSettings::addPrimOp, add const

Not required for a struct and potentially confusing.
This commit is contained in:
Robert Hensing 2025-03-26 19:22:40 +00:00
parent d48101109d
commit 6fc9651d57
4 changed files with 5 additions and 23 deletions

View file

@ -103,13 +103,4 @@ Path getNixDefExpr()
: getHome() + "/.nix-defexpr";
}
void EvalSettings::addPrimOp(PrimOp && primOp)
{
extraPrimOps.emplace_back(std::move(primOp));
}
void EvalSettings::addPrimOp(const PrimOp & primOp)
{
extraPrimOps.emplace_back(PrimOp(primOp));
}
} // namespace nix

View file

@ -53,15 +53,6 @@ struct EvalSettings : Config
std::vector<PrimOp> extraPrimOps;
/**
* Register a primop to be added when an EvalState is created from these settings.
*/
void addPrimOp(PrimOp && primOp);
/**
* Register a primop to be added when an EvalState is created from these settings.
*/
void addPrimOp(const PrimOp & primOp);
Setting<bool> enableNativeCode{this, false, "allow-unsafe-native-code-during-evaluation", R"(
Enable built-in functions that allow executing native code.