diff options
author | volth <volth@webmaster.ms> | 2018-05-16 10:52:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-16 10:52:19 +0000 |
commit | 6cc28c0589a0072e94128976ddbf8b2fbfd9f496 (patch) | |
tree | 7232327b6ac13457597afc9e1e02fd570b535c1d /src/libexpr/primops.cc | |
parent | f3c090f91ce5e188151d887e3b5806239f5e6c0a (diff) |
add `mod' and bitwise builtins: camel-case function names
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r-- | src/libexpr/primops.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 8514e804f..9dab8ecb0 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -1676,17 +1676,17 @@ static void prim_div(EvalState & state, const Pos & pos, Value * * args, Value & } } -static void prim_bin_and(EvalState & state, const Pos & pos, Value * * args, Value & v) +static void prim_bitAnd(EvalState & state, const Pos & pos, Value * * args, Value & v) { mkInt(v, state.forceInt(*args[0], pos) & state.forceInt(*args[1], pos)); } -static void prim_bin_or(EvalState & state, const Pos & pos, Value * * args, Value & v) +static void prim_bitOr(EvalState & state, const Pos & pos, Value * * args, Value & v) { mkInt(v, state.forceInt(*args[0], pos) | state.forceInt(*args[1], pos)); } -static void prim_bin_xor(EvalState & state, const Pos & pos, Value * * args, Value & v) +static void prim_bitXor(EvalState & state, const Pos & pos, Value * * args, Value & v) { mkInt(v, state.forceInt(*args[0], pos) ^ state.forceInt(*args[1], pos)); } @@ -2235,9 +2235,9 @@ void EvalState::createBaseEnv() addPrimOp("__sub", 2, prim_sub); addPrimOp("__mul", 2, prim_mul); addPrimOp("__div", 2, prim_div); - addPrimOp("__bin_and", 2, prim_bin_and); - addPrimOp("__bin_or", 2, prim_bin_or); - addPrimOp("__bin_xor", 2, prim_bin_xor); + addPrimOp("__bitAnd", 2, prim_bitAnd); + addPrimOp("__bitOr", 2, prim_bitOr); + addPrimOp("__bitXor", 2, prim_bitXor); addPrimOp("__lessThan", 2, prim_lessThan); // String manipulation |