Mercurial Hosting > luan
diff src/luan/tools/WebShell.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 | 3c404a296995 |
children | eacf6ce1b47d |
line wrap: on
line diff
--- a/src/luan/tools/WebShell.java Fri May 23 04:36:47 2014 +0000 +++ b/src/luan/tools/WebShell.java Fri May 23 20:40:05 2014 +0000 @@ -13,6 +13,7 @@ import javax.servlet.http.HttpSession; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import luan.Luan; import luan.LuanFunction; import luan.LuanState; import luan.LuanTable; @@ -27,13 +28,9 @@ protected LuanState newLuanState() throws LuanException { return LuanState.newStandard(); } -/* - protected LuanTable newEnvironment(LuanState luan) throws LuanException { - return luan.newEnvironment(); - } -*/ + protected Object[] eval(LuanState luan,String cmd) throws LuanException { - return luan.eval(cmd,"WebShell",true); + return Luan.array(luan.eval(cmd,"WebShell",true)); } @Override protected void service(HttpServletRequest request,HttpServletResponse response)