format dostring

This commit is contained in:
fesily 2023-08-25 09:32:37 +08:00
parent 63d89e7e3e
commit c87cb013df
2 changed files with 2 additions and 4 deletions

View File

@ -76,8 +76,7 @@ LUALIB_API void luaL_openlibs(lua_State *L)
" end\n"
" return dump(f, strip)\n"
"end\n";
if (luaL_loadstring(L, dump_fix) == 0)
lua_pcall(L, 0, 0, 0);
luaL_dostring(L, dump_fix);
#endif
#ifdef DO_LUA_INIT
void handle_luainit(lua_State *L);

View File

@ -473,7 +473,7 @@ static int lj_cf_package_require(lua_State *L)
lj_lib_checkfpu(L);
if (strcmp(name, "util") == 0) {
luaL_loadstring(L, "function table.reverse(tab) \n\
luaL_dostring(L, "function table.reverse(tab) \n\
local size = #tab \n\
local newTable = {} \n\
for i = 1, size - 1 do \n\
@ -495,7 +495,6 @@ static int lj_cf_package_require(lua_State *L)
end \n\
\n\
");
lua_call(L, 0, 0);
}
return 1;
}