mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-20 05:53: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"
|
" end\n"
|
||||||
" return dump(f, strip)\n"
|
" return dump(f, strip)\n"
|
||||||
"end\n";
|
"end\n";
|
||||||
if (luaL_loadstring(L, dump_fix) == 0)
|
luaL_dostring(L, dump_fix);
|
||||||
lua_pcall(L, 0, 0, 0);
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef DO_LUA_INIT
|
#ifdef DO_LUA_INIT
|
||||||
void handle_luainit(lua_State *L);
|
void handle_luainit(lua_State *L);
|
||||||
|
@ -473,7 +473,7 @@ static int lj_cf_package_require(lua_State *L)
|
|||||||
lj_lib_checkfpu(L);
|
lj_lib_checkfpu(L);
|
||||||
|
|
||||||
if (strcmp(name, "util") == 0) {
|
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 size = #tab \n\
|
||||||
local newTable = {} \n\
|
local newTable = {} \n\
|
||||||
for i = 1, size - 1 do \n\
|
for i = 1, size - 1 do \n\
|
||||||
@ -495,7 +495,6 @@ static int lj_cf_package_require(lua_State *L)
|
|||||||
end \n\
|
end \n\
|
||||||
\n\
|
\n\
|
||||||
");
|
");
|
||||||
lua_call(L, 0, 0);
|
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user