mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 07:34:07 +00:00
Print version and JIT status to stdout, not stderr.
This commit is contained in:
parent
9ab2ae8d46
commit
0bd1a66f2f
13
src/luajit.c
13
src/luajit.c
@ -133,8 +133,7 @@ static int docall(lua_State *L, int narg, int clear)
|
|||||||
|
|
||||||
static void print_version(void)
|
static void print_version(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fputs(LUAJIT_VERSION " -- " LUAJIT_COPYRIGHT ". " LUAJIT_URL "\n", stdout);
|
||||||
LUAJIT_VERSION " -- " LUAJIT_COPYRIGHT ". " LUAJIT_URL "\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_jit_status(lua_State *L)
|
static void print_jit_status(lua_State *L)
|
||||||
@ -148,10 +147,12 @@ static void print_jit_status(lua_State *L)
|
|||||||
lua_remove(L, -2);
|
lua_remove(L, -2);
|
||||||
n = lua_gettop(L);
|
n = lua_gettop(L);
|
||||||
lua_call(L, 0, LUA_MULTRET);
|
lua_call(L, 0, LUA_MULTRET);
|
||||||
fputs(lua_toboolean(L, n) ? "JIT: ON" : "JIT: OFF", stderr);
|
fputs(lua_toboolean(L, n) ? "JIT: ON" : "JIT: OFF", stdout);
|
||||||
for (n++; (s = lua_tostring(L, n)); n++)
|
for (n++; (s = lua_tostring(L, n)); n++) {
|
||||||
fprintf(stderr, " %s", s);
|
putc(' ', stdout);
|
||||||
fputs("\n", stderr);
|
fputs(s, stdout);
|
||||||
|
}
|
||||||
|
putc('\n', stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int getargs(lua_State *L, char **argv, int n)
|
static int getargs(lua_State *L, char **argv, int n)
|
||||||
|
Loading…
Reference in New Issue
Block a user