[NOTHING CHANGED] Assorted fixes #48

Closed
asiekierka wants to merge 61 commits from asiekierka/master into master
3 changed files with 2 additions and 13 deletions
Showing only changes of commit ac261965a8 - Show all commits

View File

@@ -1067,7 +1067,7 @@ public class LuaValue extends Varargs {
* @param msg String providing information about the invalid argument * @param msg String providing information about the invalid argument
* @throws LuaError in all cases * @throws LuaError in all cases
*/ */
public static LuaValue argerror(int iarg,String msg) { throw new LuaError("bad argument #"+iarg+" ("+msg+")"); } public static LuaValue argerror(int iarg,String msg) { throw new LuaError("bad argument #"+iarg+": "+msg); }
/** /**
* Throw a {@link LuaError} indicating an invalid type was supplied to a function * Throw a {@link LuaError} indicating an invalid type was supplied to a function

View File

@@ -80,6 +80,7 @@ class StringTest {
@Test @Test
void testUtf8() { void testUtf8() {
for (int i = 4; i < 0xffff; i += 4) { for (int i = 4; i < 0xffff; i += 4) {
if (i == 0xd800) i = 0xe000;
char[] c = { (char) (i+0), (char) (i+1), (char) (i+2), (char) (i+3) }; char[] c = { (char) (i+0), (char) (i+1), (char) (i+2), (char) (i+3) };
String before = new String(c) + " " + i + "-" + (i+4); String before = new String(c) + " " + i + "-" + (i+4);
LuaString ls = LuaString.valueOf(before); LuaString ls = LuaString.valueOf(before);

View File

@@ -87,22 +87,10 @@ import org.luaj.vm2.lib.ResourceFinder;
public class JseBaseLib extends org.luaj.vm2.lib.BaseLib { public class JseBaseLib extends org.luaj.vm2.lib.BaseLib {
<<<<<<< HEAD:src/jse/org/luaj/vm2/lib/jse/JseBaseLib.java
/** Perform one-time initialization on the library by creating a table /** Perform one-time initialization on the library by creating a table
* containing the library functions, adding that table to the supplied environment, * containing the library functions, adding that table to the supplied environment,
* adding the table to package.loaded, and returning table as the return value. * adding the table to package.loaded, and returning table as the return value.
* <P>Specifically, extend the library loading to set the default value for {@link Globals#STDIN} * <P>Specifically, extend the library loading to set the default value for {@link Globals#STDIN}
=======
/**
* Perform one-time initialization on the library by creating a table
* containing the library functions, adding that table to the supplied
* environment, adding the table to package.loaded, and returning table as
* the return value.
* <P>
* Specifically, extend the library loading to set the default value for
* {@link Globals#STDIN}
*
>>>>>>> farmboy0/master:luaj-jse/src/main/java/org/luaj/vm2/lib/jse/JseBaseLib.java
* @param modname the module name supplied if this is loaded via 'require'. * @param modname the module name supplied if this is loaded via 'require'.
* @param env the environment to load into, which must be a Globals * @param env the environment to load into, which must be a Globals
* instance. * instance.