diff options
author | Shea Levy <shea@shealevy.com> | 2018-02-08T18·00-0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2018-02-08T19·35-0500 |
commit | 081f14a169d36243f97263acb41fb108af243619 (patch) | |
tree | 563a1287be33bff5b2d36d38a9e77338425d45b4 /tests/plugins/plugintest.cc | |
parent | 88cd2d41acb994684a3e4ead1b1676019f43b4b6 (diff) |
Allow using RegisterPrimop to define constants.
This enables plugins to add new constants, as well as new primops.
Diffstat (limited to 'tests/plugins/plugintest.cc')
-rw-r--r-- | tests/plugins/plugintest.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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); |