Refactor luaGetTable() to return a value.

This commit is contained in:
James Roseborough
2008-05-23 00:37:45 +00:00
parent c20ea01bc9
commit c2c573744b
11 changed files with 154 additions and 44 deletions

View File

@@ -183,11 +183,11 @@ public class LuaScriptEngine extends LFunction implements ScriptEngine {
b.put(k,v);
}
public void luaGetTable(LuaState vm, LValue table, LValue key) {
public LValue luaGetTable(LuaState vm, LValue table, LValue key) {
Bindings b = getBindings(ScriptContext.ENGINE_SCOPE);
String k = key.toJavaString();
Object v = b.get(k);
vm.pushlvalue((LValue)v);
return (LValue) v;
}
public Bindings getBindings(int scope) {