diff --git a/src/testLuaArch.c b/src/testLuaArch.c index 8f40d74..78bb0f2 100644 --- a/src/testLuaArch.c +++ b/src/testLuaArch.c @@ -3,13 +3,14 @@ #include #include #include -#include #include "neonucleus.h" char *testLuaSandbox = NULL; #if LUA_VERSION_NUM == 502 +#include + // monkey patching bool lua_isinteger(lua_State *L, int i) { @@ -505,7 +506,7 @@ int testLuaArch_unicode_sub(lua_State *L) { } char *sub = nn_unicode_char(points + start - 1, stop - start + 1); - char *res = testLuaArch_pushstring(L, sub); + const char *res = testLuaArch_pushstring(L, sub); nn_free(sub); nn_free(points); if (!res) { @@ -531,7 +532,7 @@ int testLuaArch_unicode_char(lua_State *L) { codepoints[i] = lua_tointeger(L, idx); } char *s = nn_unicode_char(codepoints, argc); - char *res = testLuaArch_pushstring(L, s); + const char *res = testLuaArch_pushstring(L, s); nn_free(s); nn_free(codepoints); if (!res) {