From 081f14a169d36243f97263acb41fb108af243619 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Thu, 8 Feb 2018 13:00:53 -0500 Subject: Allow using RegisterPrimop to define constants. This enables plugins to add new constants, as well as new primops. --- tests/plugins/plugintest.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/plugins') diff --git a/tests/plugins/plugintest.cc b/tests/plugins/plugintest.cc index f788c4814322..6b5e6d7cde21 100644 --- a/tests/plugins/plugintest.cc +++ b/tests/plugins/plugintest.cc @@ -2,9 +2,9 @@ using namespace nix; -static void prim_constNull (EvalState & state, const Pos & pos, Value ** args, Value & v) +static void prim_anotherNull (EvalState & state, const Pos & pos, Value ** args, Value & v) { mkNull(v); } -static RegisterPrimOp r("constNull", 1, prim_constNull); +static RegisterPrimOp r("anotherNull", 0, prim_anotherNull); -- cgit 1.4.1