Tweaks from repl_tools

This commit is contained in:
2023-02-23 03:35:05 +11:00
parent 5e0268f519
commit 3fca594209
5 changed files with 9 additions and 7 deletions

View File

@@ -123,8 +123,8 @@ static int nativeLoadRootNode(Toy_Interpreter* interpreter, Toy_LiteralArray* ar
//load the new root node
size_t size = 0;
const char* source = Toy_readFile(Toy_toCString(TOY_AS_STRING(filePathLiteral)), &size);
const unsigned char* tb = Toy_compileString(source, &size);
const unsigned char* source = Toy_readFile(Toy_toCString(TOY_AS_STRING(filePathLiteral)), &size);
const unsigned char* tb = Toy_compileString((const char*)source, &size);
free((void*)source);
engine.rootNode = TOY_ALLOCATE(Box_EngineNode, 1);