1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01: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

View file

@ -26,9 +26,9 @@ typedef void (* PrimOpFun) (EvalState & state, const Pos & pos, Value * * args,
struct PrimOp
{
PrimOpFun fun;
unsigned int arity;
size_t arity;
Symbol name;
PrimOp(PrimOpFun fun, unsigned int arity, Symbol name)
PrimOp(PrimOpFun fun, size_t arity, Symbol name)
: fun(fun), arity(arity), name(name) { }
};