Improve compatibility with lua 5.2.

This commit is contained in:
James Roseborough
2012-09-21 05:24:58 +00:00
parent 9666f40ad7
commit be4a320bf9
7 changed files with 154 additions and 117 deletions

View File

@@ -1,5 +1,6 @@
import org.luaj.vm2.Globals;
import org.luaj.vm2.LuaValue;
import org.luaj.vm2.lib.jse.JsePlatform;
@@ -10,8 +11,8 @@ public class SampleJseMain {
String script = "examples/lua/hello.lua";
// create an environment to run in
LuaValue _G = JsePlatform.standardGlobals();
_G.get("dofile").call( LuaValue.valueOf(script) );
Globals _G = JsePlatform.standardGlobals();
_G.loadFile(script).arg1().call( LuaValue.valueOf(script) );
}