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

Make primop registration pluggable

This way we don't have to put all primops in one giant file.
This commit is contained in:
Eelco Dolstra 2016-04-13 11:15:45 +02:00
parent 96515b0c0d
commit 12b257f045
4 changed files with 33 additions and 3 deletions

15
src/libexpr/primops.hh Normal file
View file

@ -0,0 +1,15 @@
#include "eval.hh"
#include <tuple>
#include <vector>
namespace nix {
struct RegisterPrimOp
{
typedef std::vector<std::tuple<std::string, size_t, PrimOpFun>> PrimOps;
static PrimOps * primOps;
RegisterPrimOp(std::string name, size_t arity, PrimOpFun fun);
};
}