Java Code Examples for org.luaj.vm2.Lua#ISK
The following examples show how to use
org.luaj.vm2.Lua#ISK .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DebugLib.java From luaj with MIT License | 5 votes |
static String kname(Prototype p, int pc, int c) { if (Lua.ISK(c)) { /* is 'c' a constant? */ LuaValue k = p.k[Lua.INDEXK(c)]; if (k.isstring()) { /* literal constant? */ return k.tojstring(); /* it is its own name */ } /* else no reasonable name found */ } else { /* 'c' is a register */ NameWhat what = getobjname(p, pc, c); /* search for 'c' */ if (what != null && "constant".equals(what.namewhat)) { /* found a constant name? */ return what.name; /* 'name' already filled */ } /* else no reasonable name found */ } return "?"; /* no reasonable name found */ }
Example 2
Source File: DebugLib.java From VideoOS-Android-SDK with GNU General Public License v3.0 | 4 votes |
static LuaString kname(Prototype p, int c) { if (Lua.ISK(c) && p.k[Lua.INDEXK(c)].isstring()) return p.k[Lua.INDEXK(c)].strvalue(); else return QMARK; }
Example 3
Source File: DebugLib.java From XPrivacyLua with GNU General Public License v3.0 | 4 votes |
static LuaString kname(Prototype p, int c) { if (Lua.ISK(c) && p.k[Lua.INDEXK(c)].isstring()) return p.k[Lua.INDEXK(c)].strvalue(); else return QMARK; }
Example 4
Source File: DebugLib.java From HtmlNative with Apache License 2.0 | 4 votes |
static LuaString kname(Prototype p, int c) { if (Lua.ISK(c) && p.k[Lua.INDEXK(c)].isstring()) return p.k[Lua.INDEXK(c)].strvalue(); else return QMARK; }