Misc fixes to java api

This commit is contained in:
James Roseborough
2007-10-05 18:38:42 +00:00
parent e4882578f2
commit ec9cff9050
4 changed files with 22 additions and 3 deletions

View File

@@ -1,2 +1,4 @@
bin
target
build
luaj-vm-1.0.jar

View File

@@ -69,6 +69,6 @@ abstract public class JavaFunction extends LFunction {
*/
public boolean luaStackCall(VM vm) {
vm.invokeJavaFunction( this );
return true;
return false;
}
}

View File

@@ -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. <span class="apii">[-1, +1,
@@ -930,6 +930,18 @@ public interface VM {
*/
public void pushlstring(byte[] bytes, int offset, int length);
/**
* Push an LValue onto the stack. <span class="apii">[-0, +1,
* <em>m</em>]</span>
*/
public void pushlvalue(LValue v);
/**
* Push an LString onto the stack. <span class="apii">[-0, +1,
* <em>m</em>]</span>
*/
public void pushlstring(LString luaGetTypeName);
/**
* Pushes a nil value onto the stack. <span class="apii">[-0, +1, <em>-</em>]</span>
*

View File

@@ -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