diff --git a/.gitignore b/.gitignore index dccf75b..408efe4 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,8 @@ bin/ *.db *.o *.a +*.so +*.dll *.exe *.meta *.log diff --git a/Toy b/Toy index cdca6fa..d3df01c 160000 --- a/Toy +++ b/Toy @@ -1 +1 @@ -Subproject commit cdca6fa45cb59a9d27e35fc423063cabd7fb2f76 +Subproject commit d3df01c1c4ae625fb7a3a36eb0ae8afee31bfefa diff --git a/box/box_engine.c b/box/box_engine.c index 1948b74..60f6fdd 100644 --- a/box/box_engine.c +++ b/box/box_engine.c @@ -56,8 +56,8 @@ void Box_initEngine() { Toy_injectNativeHook(&engine.interpreter, "input", Box_hookInput); size_t size = 0; - const char* source = Toy_readFile("./assets/scripts/init.toy", &size); - const unsigned char* tb = Toy_compileString(source, &size); + const unsigned char* source = Toy_readFile("./assets/scripts/init.toy", &size); + const unsigned char* tb = Toy_compileString((const char*)source, &size); free((void*)source); Toy_runInterpreter(&engine.interpreter, tb, size); diff --git a/box/lib_engine.c b/box/lib_engine.c index c98d116..bd036a9 100644 --- a/box/lib_engine.c +++ b/box/lib_engine.c @@ -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); diff --git a/box/lib_node.c b/box/lib_node.c index 35bd29e..ea0045d 100644 --- a/box/lib_node.c +++ b/box/lib_node.c @@ -44,8 +44,8 @@ static int nativeLoadNode(Toy_Interpreter* interpreter, Toy_LiteralArray* argume //load the new 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); Box_EngineNode* node = TOY_ALLOCATE(Box_EngineNode, 1);