summaryrefslogtreecommitdiff
path: root/src/lua-interface.cpp
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2009-11-08 08:29:35 +0100
committerPixel <pixel@nobis-crew.org>2009-11-08 08:29:35 +0100
commit189c8caacb8cf4b007fe8e1e806b70f9a7013730 (patch)
tree755cdd7d7f2d166bca8f101908b75a4187793205 /src/lua-interface.cpp
parent85bc3217ad86161042beba3f94d8d63d65b50a5d (diff)
Humf... tired...
Diffstat (limited to 'src/lua-interface.cpp')
-rw-r--r--src/lua-interface.cpp13
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) {