1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-15 06:52:43 +01:00

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

Not required for a struct and potentially confusing.

(cherry picked from commit 6fc9651d57)
This commit is contained in:
Robert Hensing 2025-03-26 19:22:40 +00:00 committed by Mergify
parent cdb1d2c4c8
commit 9dfadd3694
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.