diff src/luan/lib/BasicLib.java @ 111:2428ecfed375

change LuanFunction.call() from returning Object[] to returning Object, to reduce garbage collection git-svn-id: https://luan-java.googlecode.com/svn/trunk@112 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Fri, 23 May 2014 20:40:05 +0000
parents 219e05867366
children f5af13062b10
line wrap: on
line diff
--- a/src/luan/lib/BasicLib.java	Fri May 23 04:36:47 2014 +0000
+++ b/src/luan/lib/BasicLib.java	Fri May 23 20:40:05 2014 +0000
@@ -22,7 +22,7 @@
 	public static final String NAME = "Basic";
 
 	public static final LuanFunction LOADER = new LuanFunction() {
-		@Override public Object[] call(LuanState luan,Object[] args) {
+		@Override public Object call(LuanState luan,Object[] args) {
 			LuanTable module = new LuanTable();
 			LuanTable global = luan.global();
 			try {
@@ -54,7 +54,7 @@
 			} catch(NoSuchMethodException e) {
 				throw new RuntimeException(e);
 			}
-			return new Object[]{module};
+			return module;
 		}
 	};
 
@@ -92,7 +92,7 @@
 		}
 	}
 
-	public static Object[] do_file(LuanState luan,String fileName) throws LuanException {
+	public static Object do_file(LuanState luan,String fileName) throws LuanException {
 		LuanFunction fn = load_file(luan,fileName);
 		return luan.JAVA.call(fn,null);
 	}