forked from Mirror/wren
disambiguate the call here from the call in wren_compiler.c (fixes amalgamation having overalapped symbols)
This commit is contained in:
@ -246,7 +246,7 @@ DEF_PRIMITIVE(fn_arity)
|
||||
RETURN_NUM(AS_CLOSURE(args[0])->fn->arity);
|
||||
}
|
||||
|
||||
static void call(WrenVM* vm, Value* args, int numArgs)
|
||||
static void call_fn(WrenVM* vm, Value* args, int numArgs)
|
||||
{
|
||||
// We only care about missing arguments, not extras.
|
||||
if (AS_CLOSURE(args[0])->fn->arity > numArgs)
|
||||
@ -254,7 +254,7 @@ static void call(WrenVM* vm, Value* args, int numArgs)
|
||||
vm->fiber->error = CONST_STRING(vm, "Function expects more arguments.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// +1 to include the function itself.
|
||||
wrenCallFunction(vm, vm->fiber, AS_CLOSURE(args[0]), numArgs + 1);
|
||||
}
|
||||
@ -262,7 +262,7 @@ static void call(WrenVM* vm, Value* args, int numArgs)
|
||||
#define DEF_FN_CALL(numArgs) \
|
||||
DEF_PRIMITIVE(fn_call##numArgs) \
|
||||
{ \
|
||||
call(vm, args, numArgs); \
|
||||
call_fn(vm, args, numArgs); \
|
||||
return false; \
|
||||
} \
|
||||
|
||||
|
||||
Reference in New Issue
Block a user