mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
Merge pull request #8516 from wentasah/remove-registerprimop
Remove RegisterPrimOp constructor without support for documentation
This commit is contained in:
commit
ca9f544160
3 changed files with 5 additions and 18 deletions
|
@ -4058,18 +4058,6 @@ static RegisterPrimOp primop_splitVersion({
|
||||||
RegisterPrimOp::PrimOps * RegisterPrimOp::primOps;
|
RegisterPrimOp::PrimOps * RegisterPrimOp::primOps;
|
||||||
|
|
||||||
|
|
||||||
RegisterPrimOp::RegisterPrimOp(std::string name, size_t arity, PrimOpFun fun)
|
|
||||||
{
|
|
||||||
if (!primOps) primOps = new PrimOps;
|
|
||||||
primOps->push_back({
|
|
||||||
.name = name,
|
|
||||||
.args = {},
|
|
||||||
.arity = arity,
|
|
||||||
.fun = fun,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
RegisterPrimOp::RegisterPrimOp(Info && info)
|
RegisterPrimOp::RegisterPrimOp(Info && info)
|
||||||
{
|
{
|
||||||
if (!primOps) primOps = new PrimOps;
|
if (!primOps) primOps = new PrimOps;
|
||||||
|
|
|
@ -28,11 +28,6 @@ struct RegisterPrimOp
|
||||||
* will get called during EvalState initialization, so there
|
* will get called during EvalState initialization, so there
|
||||||
* may be primops not yet added and builtins is not yet sorted.
|
* may be primops not yet added and builtins is not yet sorted.
|
||||||
*/
|
*/
|
||||||
RegisterPrimOp(
|
|
||||||
std::string name,
|
|
||||||
size_t arity,
|
|
||||||
PrimOpFun fun);
|
|
||||||
|
|
||||||
RegisterPrimOp(Info && info);
|
RegisterPrimOp(Info && info);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,4 +21,8 @@ static void prim_anotherNull (EvalState & state, const PosIdx pos, Value ** args
|
||||||
v.mkBool(false);
|
v.mkBool(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static RegisterPrimOp rp("anotherNull", 0, prim_anotherNull);
|
static RegisterPrimOp rp({
|
||||||
|
.name = "anotherNull",
|
||||||
|
.arity = 0,
|
||||||
|
.fun = prim_anotherNull,
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in a new issue