Add skeleton for string library calls.
This commit is contained in:
@@ -146,4 +146,11 @@ public interface VM {
|
||||
* must be on the top of the stack.
|
||||
*/
|
||||
public void lua_error();
|
||||
|
||||
/**
|
||||
* Raises an error. The message is pushed onto the stack and used as the error message.
|
||||
* It also adds at the beginning of the message the file name and the line number where
|
||||
* the error occurred, if this information is available.
|
||||
*/
|
||||
public void luaL_error(String message);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import java.util.StringTokenizer;
|
||||
import lua.CallInfo;
|
||||
import lua.StackState;
|
||||
import lua.io.LocVars;
|
||||
import lua.value.LValue;
|
||||
|
||||
public class DebugStackState extends StackState implements DebugRequestListener {
|
||||
|
||||
@@ -18,7 +17,6 @@ public class DebugStackState extends StackState implements DebugRequestListener
|
||||
private int lastline = -1;
|
||||
|
||||
public DebugStackState() {
|
||||
StackState.debugHooksEnabled = true;
|
||||
}
|
||||
|
||||
// debug hooks
|
||||
|
||||
@@ -342,4 +342,8 @@ public class LString extends LValue {
|
||||
System.arraycopy( a, 0, newbytes, 0, Math.min( newSize, a.length ) );
|
||||
return newbytes;
|
||||
}
|
||||
|
||||
public int luaByte(int index) {
|
||||
return m_bytes[m_offset + index];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user