Replace settop(0) with resettop()

This commit is contained in:
James Roseborough
2007-11-16 19:19:13 +00:00
parent d7ae4a809c
commit 45f483f706
8 changed files with 46 additions and 46 deletions

View File

@@ -82,7 +82,7 @@ public final class LuajavaLib extends LFunction {
className = vm.tostring(2);
try {
Class clazz = Class.forName(className);
vm.settop(0);
vm.resettop();
vm.pushlvalue( new LInstance( clazz, clazz ) );
} catch (Exception e) {
throw new LuaErrorException(e);
@@ -101,7 +101,7 @@ public final class LuajavaLib extends LFunction {
Object o = con.newInstance( args );
// set the result
vm.settop(0);
vm.resettop();
vm.pushlvalue( new LInstance( o, clazz ) );
} catch (Exception e) {
@@ -164,7 +164,7 @@ public final class LuajavaLib extends LFunction {
Field f = c.getField(s);
Object v = CoerceLuaToJava.coerceArg(val, f.getType());
f.set(m_instance,v);
vm.settop(0);
vm.resettop();
} catch (Exception e) {
throw new LuaErrorException(e);
}
@@ -200,7 +200,7 @@ public final class LuajavaLib extends LFunction {
Object result = meth.invoke( instance, args );
// coerce the result
vm.settop(0);
vm.resettop();
vm.pushlvalue( CoerceJavaToLua.coerce(result) );
return false;
} catch (Exception e) {