Expose final fields of LString

This commit is contained in:
James Roseborough
2007-09-26 00:44:53 +00:00
parent edbe168e42
commit 673d0e4117
2 changed files with 10 additions and 5 deletions

View File

@@ -115,6 +115,7 @@ public class StrLib {
* except as arguments to the q option.
*/
static void format( VM vm ) {
vm.setResult( new LString("") );
}
/**
@@ -141,7 +142,10 @@ public class StrLib {
* For this function, a '^' at the start of a pattern does not work as an anchor,
* as this would prevent the iteration.
*/
static void gmatch( VM vm ) {
static void gmatch( VM vm ) {
LString s = vm.getArgAsLuaString(0);
LString pattern = vm.getArgAsLuaString(1);
vm.setResult();
}
/**

View File

@@ -27,10 +27,10 @@ public class LString extends LValue {
public static final LString TYPE_NAME = new LString("string");
final byte[] m_bytes;
final int m_offset;
final int m_length;
final int m_hash;
public final byte[] m_bytes;
public final int m_offset;
public final int m_length;
public final int m_hash;
private static LTable s_stringMT;
@@ -388,4 +388,5 @@ public class LString extends LValue {
public int luaByte(int index) {
return m_bytes[m_offset + index] & 0x0FF;
}
}