forked from Mirror/wren
22 lines
480 B
C
22 lines
480 B
C
|
|
#include <string.h>
|
||
|
|
|
||
|
|
#include "benchmark.h"
|
||
|
|
|
||
|
|
static void arguments(WrenVM* vm)
|
||
|
|
{
|
||
|
|
double result = 0;
|
||
|
|
result += wrenGetArgumentDouble(vm, 1);
|
||
|
|
result += wrenGetArgumentDouble(vm, 2);
|
||
|
|
result += wrenGetArgumentDouble(vm, 3);
|
||
|
|
result += wrenGetArgumentDouble(vm, 4);
|
||
|
|
|
||
|
|
wrenReturnDouble(vm, result);
|
||
|
|
}
|
||
|
|
|
||
|
|
WrenForeignMethodFn benchmarkBindMethod(const char* signature)
|
||
|
|
{
|
||
|
|
if (strcmp(signature, "static Benchmark.arguments(_,_,_,_)") == 0) return arguments;
|
||
|
|
|
||
|
|
return NULL;
|
||
|
|
}
|