mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-19 13:33:26 +00:00
format dostring
This commit is contained in:
parent
63d89e7e3e
commit
c87cb013df
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user