mirror of
https://github.com/NixOS/nix
synced 2025-06-28 17:51:15 +02:00
callFunction: Use std::span
This is a bit safer than having a separate nrArgs argument.
This commit is contained in:
parent
14edb78d53
commit
a2e4a4c238
5 changed files with 22 additions and 27 deletions
|
@ -690,13 +690,12 @@ public:
|
|||
|
||||
bool isFunctor(Value & fun);
|
||||
|
||||
// FIXME: use std::span
|
||||
void callFunction(Value & fun, size_t nrArgs, Value * * args, Value & vRes, const PosIdx pos);
|
||||
void callFunction(Value & fun, std::span<Value *> args, Value & vRes, const PosIdx pos);
|
||||
|
||||
void callFunction(Value & fun, Value & arg, Value & vRes, const PosIdx pos)
|
||||
{
|
||||
Value * args[] = {&arg};
|
||||
callFunction(fun, 1, args, vRes, pos);
|
||||
callFunction(fun, args, vRes, pos);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue