Expose final fields of LString
This commit is contained in:
@@ -115,6 +115,7 @@ public class StrLib {
|
|||||||
* except as arguments to the q option.
|
* except as arguments to the q option.
|
||||||
*/
|
*/
|
||||||
static void format( VM vm ) {
|
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,
|
* For this function, a '^' at the start of a pattern does not work as an anchor,
|
||||||
* as this would prevent the iteration.
|
* 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ public class LString extends LValue {
|
|||||||
|
|
||||||
public static final LString TYPE_NAME = new LString("string");
|
public static final LString TYPE_NAME = new LString("string");
|
||||||
|
|
||||||
final byte[] m_bytes;
|
public final byte[] m_bytes;
|
||||||
final int m_offset;
|
public final int m_offset;
|
||||||
final int m_length;
|
public final int m_length;
|
||||||
final int m_hash;
|
public final int m_hash;
|
||||||
|
|
||||||
private static LTable s_stringMT;
|
private static LTable s_stringMT;
|
||||||
|
|
||||||
@@ -388,4 +388,5 @@ public class LString extends LValue {
|
|||||||
public int luaByte(int index) {
|
public int luaByte(int index) {
|
||||||
return m_bytes[m_offset + index] & 0x0FF;
|
return m_bytes[m_offset + index] & 0x0FF;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user