1
0
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:
Alison Winters
2021-03-07 16:38:29 -08:00
committed by GitHub
parent 5b290cacc5
commit 4d1d0d972e
2 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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;