Mercurial Hosting > luan
diff core/src/luan/modules/BasicLuan.java @ 575:7c3ad6db8ac3
make LuanState.JAVA private
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 13 Jul 2015 18:34:31 -0600 |
parents | 6cc2f047019b |
children | 60c549d43988 |
line wrap: on
line diff
--- a/core/src/luan/modules/BasicLuan.java Mon Jul 13 12:31:53 2015 -0600 +++ b/core/src/luan/modules/BasicLuan.java Mon Jul 13 18:34:31 2015 -0600 @@ -45,7 +45,7 @@ public static LuanFunction pairs(final LuanState luan,final LuanTable t) throws LuanException { Utils.checkNotNull(luan,t); - return t.pairs(luan.JAVA); + return t.pairs(luan); } public static LuanFunction ipairs(LuanState luan,final LuanTable t) throws LuanException { @@ -105,7 +105,7 @@ } public static String to_string(LuanState luan,Object v) throws LuanException { - return luan.JAVA.toString(v); + return luan.toString(v); } public static LuanTable new_error(LuanState luan,Object msg) throws LuanException { @@ -183,21 +183,21 @@ public static Object try_(LuanState luan,LuanTable blocks) throws LuanException { Utils.checkNotNull(luan,blocks); - Object obj = blocks.get(luan.JAVA,1); + Object obj = blocks.get(luan,1); if( obj == null ) throw luan.exception("missing 'try' value"); if( !(obj instanceof LuanFunction) ) throw luan.exception("bad 'try' value (function expected, got "+Luan.type(obj)+")"); LuanFunction tryFn = (LuanFunction)obj; LuanFunction catchFn = null; - obj = blocks.get(luan.JAVA,"catch"); + obj = blocks.get(luan,"catch"); if( obj != null ) { if( !(obj instanceof LuanFunction) ) throw luan.exception("bad 'catch' value (function expected, got "+Luan.type(obj)+")"); catchFn = (LuanFunction)obj; } LuanFunction finallyFn = null; - obj = blocks.get(luan.JAVA,"finally"); + obj = blocks.get(luan,"finally"); if( obj != null ) { if( !(obj instanceof LuanFunction) ) throw luan.exception("bad 'finally' value (function expected, got "+Luan.type(obj)+")");