Misc fixes to java api
This commit is contained in:
@@ -1,2 +1,4 @@
|
|||||||
bin
|
bin
|
||||||
target
|
target
|
||||||
|
build
|
||||||
|
luaj-vm-1.0.jar
|
||||||
|
|||||||
@@ -69,6 +69,6 @@ abstract public class JavaFunction extends LFunction {
|
|||||||
*/
|
*/
|
||||||
public boolean luaStackCall(VM vm) {
|
public boolean luaStackCall(VM vm) {
|
||||||
vm.invokeJavaFunction( this );
|
vm.invokeJavaFunction( this );
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -457,7 +457,7 @@ public interface VM {
|
|||||||
* index. If the index is not valid, or if the value does not have a
|
* 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.
|
* 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,
|
* 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);
|
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>
|
* Pushes a nil value onto the stack. <span class="apii">[-0, +1, <em>-</em>]</span>
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -16,6 +16,11 @@ import lua.value.LValue;
|
|||||||
|
|
||||||
public class LuaJTest extends TestCase {
|
public class LuaJTest extends TestCase {
|
||||||
|
|
||||||
|
/*
|
||||||
|
public void testTest6() throws IOException, InterruptedException {
|
||||||
|
runTest( "test6" );
|
||||||
|
}
|
||||||
|
/*/
|
||||||
public void testTest1() throws IOException, InterruptedException {
|
public void testTest1() throws IOException, InterruptedException {
|
||||||
runTest( "test1" );
|
runTest( "test1" );
|
||||||
}
|
}
|
||||||
@@ -95,7 +100,7 @@ public class LuaJTest extends TestCase {
|
|||||||
public void testUpvalues2() throws IOException, InterruptedException {
|
public void testUpvalues2() throws IOException, InterruptedException {
|
||||||
runTest( "upvalues2" );
|
runTest( "upvalues2" );
|
||||||
}
|
}
|
||||||
|
//*/
|
||||||
private void runTest( String testName ) throws IOException, InterruptedException {
|
private void runTest( String testName ) throws IOException, InterruptedException {
|
||||||
|
|
||||||
// Reset the _G table just in case some test mucks with it
|
// Reset the _G table just in case some test mucks with it
|
||||||
|
|||||||
Reference in New Issue
Block a user