Fix calling convention by managing top of stack and adjusting on way in and out of function calls.

This commit is contained in:
James Roseborough
2007-06-11 05:51:19 +00:00
parent 05cfdaa33b
commit da6f63bb3d
5 changed files with 18 additions and 17 deletions

View File

@@ -17,8 +17,8 @@ public class Closure extends LValue {
// perform a lua call
public int luaStackCall(StackState state, int base, int nargs) {
state.clear( base+1+nargs, p.numparams-nargs );
return state.vmExecute( this, base+1 );
public void luaStackCall(StackState state, int base) {
state.adjustTop( base+1+p.numparams );
state.vmExecute( this, base+1 );
}
}