forked from Mirror/wren
rename some test functions that clash with libc (#936)
* rename some test functions that clash with cosmopolitan libc
This commit is contained in:
@ -49,7 +49,7 @@ static void insert(WrenVM* vm)
|
||||
wrenSetMapValue(vm, 0, 1, 2);
|
||||
}
|
||||
|
||||
static void remove(WrenVM* vm)
|
||||
static void removeKey(WrenVM* vm)
|
||||
{
|
||||
wrenEnsureSlots(vm, 3);
|
||||
|
||||
@ -104,7 +104,7 @@ WrenForeignMethodFn mapsBindMethod(const char* signature)
|
||||
{
|
||||
if (strcmp(signature, "static Maps.newMap()") == 0) return newMap;
|
||||
if (strcmp(signature, "static Maps.insert()") == 0) return insert;
|
||||
if (strcmp(signature, "static Maps.remove(_)") == 0) return remove;
|
||||
if (strcmp(signature, "static Maps.remove(_)") == 0) return removeKey;
|
||||
if (strcmp(signature, "static Maps.count(_)") == 0) return countWren;
|
||||
if (strcmp(signature, "static Maps.count()") == 0) return countAPI;
|
||||
if (strcmp(signature, "static Maps.contains()") == 0) return containsAPI;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
#include "resolution.h"
|
||||
|
||||
static void write(WrenVM* vm, const char* text)
|
||||
static void writeFn(WrenVM* vm, const char* text)
|
||||
{
|
||||
printf("%s", text);
|
||||
}
|
||||
@ -45,7 +45,7 @@ static WrenLoadModuleResult loadModule(WrenVM* vm, const char* module)
|
||||
static void runTestVM(WrenVM* vm, WrenConfiguration* configuration,
|
||||
const char* source)
|
||||
{
|
||||
configuration->writeFn = write;
|
||||
configuration->writeFn = writeFn;
|
||||
configuration->errorFn = reportError;
|
||||
configuration->loadModuleFn = loadModule;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user