mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 07:34:07 +00:00
Merge branch 'master' into v2.1
This commit is contained in:
commit
ce477ffbfa
14
src/luajit.c
14
src/luajit.c
@ -300,17 +300,17 @@ static int loadjitmodule(lua_State *L)
|
|||||||
lua_concat(L, 2);
|
lua_concat(L, 2);
|
||||||
if (lua_pcall(L, 1, 1, 0)) {
|
if (lua_pcall(L, 1, 1, 0)) {
|
||||||
const char *msg = lua_tostring(L, -1);
|
const char *msg = lua_tostring(L, -1);
|
||||||
if (msg && !strncmp(msg, "module ", 7)) {
|
if (msg && !strncmp(msg, "module ", 7))
|
||||||
err:
|
goto nomodule;
|
||||||
|
return report(L, 1);
|
||||||
|
}
|
||||||
|
lua_getfield(L, -1, "start");
|
||||||
|
if (lua_isnil(L, -1)) {
|
||||||
|
nomodule:
|
||||||
l_message(progname,
|
l_message(progname,
|
||||||
"unknown luaJIT command or jit.* modules not installed");
|
"unknown luaJIT command or jit.* modules not installed");
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
|
||||||
return report(L, 1);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
lua_getfield(L, -1, "start");
|
|
||||||
if (lua_isnil(L, -1)) goto err;
|
|
||||||
lua_remove(L, -2); /* Drop module table. */
|
lua_remove(L, -2); /* Drop module table. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user