1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-20 11:11:03 -04:00
nix/tests/plugins/plugintest.cc
Shea Levy 081f14a169
Allow using RegisterPrimop to define constants.
This enables plugins to add new constants, as well as new primops.
2018-02-08 14:35:50 -05:00

11 lines
218 B
C++

#include "primops.hh"
using namespace nix;
static void prim_anotherNull (EvalState & state, const Pos & pos, Value ** args, Value & v)
{
mkNull(v);
}
static RegisterPrimOp r("anotherNull", 0, prim_anotherNull);