mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +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)
|
||||
{
|
||||
fprintf(stderr,
|
||||
LUAJIT_VERSION " -- " LUAJIT_COPYRIGHT ". " LUAJIT_URL "\n");
|
||||
fputs(LUAJIT_VERSION " -- " LUAJIT_COPYRIGHT ". " LUAJIT_URL "\n", stdout);
|
||||
}
|
||||
|
||||
static void print_jit_status(lua_State *L)
|
||||
@ -148,10 +147,12 @@ static void print_jit_status(lua_State *L)
|
||||
lua_remove(L, -2);
|
||||
n = lua_gettop(L);
|
||||
lua_call(L, 0, LUA_MULTRET);
|
||||
fputs(lua_toboolean(L, n) ? "JIT: ON" : "JIT: OFF", stderr);
|
||||
for (n++; (s = lua_tostring(L, n)); n++)
|
||||
fprintf(stderr, " %s", s);
|
||||
fputs("\n", stderr);
|
||||
fputs(lua_toboolean(L, n) ? "JIT: ON" : "JIT: OFF", stdout);
|
||||
for (n++; (s = lua_tostring(L, n)); n++) {
|
||||
putc(' ', stdout);
|
||||
fputs(s, stdout);
|
||||
}
|
||||
putc('\n', stdout);
|
||||
}
|
||||
|
||||
static int getargs(lua_State *L, char **argv, int n)
|
||||
|
Loading…
Reference in New Issue
Block a user