Mercurial Hosting > luan
diff src/luan/lib/StringLib.java @ 74:f003338d503b
improve package lib
git-svn-id: https://luan-java.googlecode.com/svn/trunk@75 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Wed, 13 Feb 2013 06:27:56 +0000 |
parents | f86e4f77ef32 |
children | 4bf3d0c0b6b9 |
line wrap: on
line diff
--- a/src/luan/lib/StringLib.java Tue Feb 12 09:46:45 2013 +0000 +++ b/src/luan/lib/StringLib.java Wed Feb 13 06:27:56 2013 +0000 @@ -19,7 +19,6 @@ public Object[] call(LuanState luan,Object[] args) throws LuanException { LuanTable module = new LuanTable(); LuanTable global = luan.global; - global.put(NAME,module); try { module.put( "byte", new LuanJavaFunction(StringLib.class.getMethod("byte_",String.class,Integer.class,Integer.class),null) ); module.put( "char", new LuanJavaFunction(StringLib.class.getMethod("char_",new byte[0].getClass()),null) ); @@ -36,7 +35,7 @@ } catch(NoSuchMethodException e) { throw new RuntimeException(e); } - return LuanFunction.EMPTY_RTN; + return new Object[]{module}; } };