Files
luaj/src/main/java/lua/io/Closure.java

23 lines
492 B
Java
Raw Normal View History

package lua.io;
import lua.CallFrame;
import lua.StackState;
import lua.value.LFunction;
import lua.value.LValue;
public class Closure extends LFunction {
public LValue env;
public Proto p;
public UpVal[] upVals;
public Closure(StackState state, Proto p) {
this.env = state._G;
this.p = p;
upVals = new UpVal[p.nups];
}
// perform a lua call
public void luaStackCall(CallFrame call, int base, int top, int nresults) {
call.state.stackCall( this, base, top, nresults );
}
}