diff --git a/.cvsignore b/.cvsignore index d567ba01..194b6fd3 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,4 @@ bin target +build +luaj-vm-1.0.jar diff --git a/src/main/java/lua/JavaFunction.java b/src/main/java/lua/JavaFunction.java index ef3a3fce..127f239b 100644 --- a/src/main/java/lua/JavaFunction.java +++ b/src/main/java/lua/JavaFunction.java @@ -69,6 +69,6 @@ abstract public class JavaFunction extends LFunction { */ public boolean luaStackCall(VM vm) { vm.invokeJavaFunction( this ); - return true; + return false; } } diff --git a/src/main/java/lua/VM.java b/src/main/java/lua/VM.java index c42f6aa6..52a08d63 100644 --- a/src/main/java/lua/VM.java +++ b/src/main/java/lua/VM.java @@ -457,7 +457,7 @@ public interface VM { * index. If the index is not valid, or if the value does not have a * metatable, the function returns 0 and pushes nothing on the stack. */ - public void getmetatable(int index); + public int getmetatable(int index); /** * Dereference a table's list element. [-1, +1, @@ -930,6 +930,18 @@ public interface VM { */ public void pushlstring(byte[] bytes, int offset, int length); + /** + * Push an LValue onto the stack. [-0, +1, + * m] + */ + public void pushlvalue(LValue v); + + /** + * Push an LString onto the stack. [-0, +1, + * m] + */ + public void pushlstring(LString luaGetTypeName); + /** * Pushes a nil value onto the stack. [-0, +1, -] * diff --git a/src/test/java/lua/LuaJTest.java b/src/test/java/lua/LuaJTest.java index 3ceba4b3..62cdb301 100644 --- a/src/test/java/lua/LuaJTest.java +++ b/src/test/java/lua/LuaJTest.java @@ -16,6 +16,11 @@ import lua.value.LValue; public class LuaJTest extends TestCase { + /* + public void testTest6() throws IOException, InterruptedException { + runTest( "test6" ); + } +/*/ public void testTest1() throws IOException, InterruptedException { runTest( "test1" ); } @@ -95,7 +100,7 @@ public class LuaJTest extends TestCase { public void testUpvalues2() throws IOException, InterruptedException { runTest( "upvalues2" ); } - + //*/ private void runTest( String testName ) throws IOException, InterruptedException { // Reset the _G table just in case some test mucks with it