refactor: consolidate per-test subdirectories into flat test/api structure with merged returns and value files
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "value.h"
|
||||
|
||||
static WrenValue* value;
|
||||
|
||||
static void setValue(WrenVM* vm)
|
||||
{
|
||||
value = wrenGetArgumentValue(vm, 1);
|
||||
}
|
||||
|
||||
static void getValue(WrenVM* vm)
|
||||
{
|
||||
wrenReturnValue(vm, value);
|
||||
wrenReleaseValue(vm, value);
|
||||
}
|
||||
|
||||
WrenForeignMethodFn valueBindForeign(const char* signature)
|
||||
{
|
||||
if (strcmp(signature, "static Api.value=(_)") == 0) return setValue;
|
||||
if (strcmp(signature, "static Api.value") == 0) return getValue;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
Reference in New Issue
Block a user