diff options
-rw-r--r-- | src/lua-interface.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lua-interface.cpp b/src/lua-interface.cpp index 506bf84..c8e5c24 100644 --- a/src/lua-interface.cpp +++ b/src/lua-interface.cpp @@ -639,18 +639,23 @@ LUAJIT_VERSION " -- " LUAJIT_COPYRIGHT ". " LUAJIT_URL "\n" } void showjitstatus(Lua * L) { + int n; + L->push("_LOADED"); L->gettable(LUA_REGISTRYINDEX); L->push("jit"); L->gettable(); + L->remove(-2); L->push("status"); L->gettable(); + L->remove(-2); n = L->gettop(); L->call(0, LUA_MULTRET); - printm(M_BARE, L->toboolean(n) ? "JIT: ON", "JIT: OFF"); - for (n++; n != L->gettop(); n++) - printm(M_BARE, " %s", s); - printm(M_BARE, "\n"); + printm(M_BARE, L->toboolean(n) ? "JIT: ON - features:" : "JIT: OFF - features:"); + for (L->remove(n); n <= L->gettop(); L->remove(n)) { + printm(M_BARE, " %s", L->tostring(n).to_charp()); + } + printm(M_BARE, "\n\n"); } void showhelp(bool longhelp = false) { |