Mercurial Hosting > luan
diff web/src/luan/modules/web/HttpLuan.java @ 221:ec016471c6eb
make LuanTable an interface
git-svn-id: https://luan-java.googlecode.com/svn/trunk@222 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 17 Jul 2014 07:49:26 +0000 |
parents | 92f5d74697f8 |
children | b76fcb72d97d |
line wrap: on
line diff
--- a/web/src/luan/modules/web/HttpLuan.java Wed Jul 16 04:59:45 2014 +0000 +++ b/web/src/luan/modules/web/HttpLuan.java Thu Jul 17 07:49:26 2014 +0000 @@ -28,7 +28,7 @@ public static final LuanFunction LOADER = new LuanFunction() { @Override public Object call(LuanState luan,Object[] args) { - LuanTable module = new LuanTable(); + LuanTable module = Luan.newTable(); try { addStatic( module, "new_luan_handler", LuanState.class ); } catch(NoSuchMethodException e) { @@ -114,7 +114,7 @@ } private LuanTable requestTable() throws NoSuchMethodException { - LuanTable tbl = new LuanTable(); + LuanTable tbl = Luan.newTable(); tbl.put("java",request); add( tbl, "get_parameter", String.class ); tbl.put( "get_header", new LuanJavaFunction( @@ -137,7 +137,7 @@ } private LuanTable responseTable() throws NoSuchMethodException { - LuanTable tbl = new LuanTable(); + LuanTable tbl = Luan.newTable(); tbl.put("java",response); add( tbl, "send_redirect", String.class ); add( tbl, "send_error", Integer.TYPE, String.class ); @@ -158,7 +158,7 @@ } private LuanTable cookieTable() throws NoSuchMethodException { - LuanTable tbl = new LuanTable(); + LuanTable tbl = Luan.newTable(); tbl.put( "get", new LuanJavaFunction( HttpLuan.class.getMethod("get_cookie",String.class), this ) ); @@ -172,7 +172,7 @@ } private LuanTable sessionTable() throws NoSuchMethodException { - LuanTable tbl = new LuanTable(); + LuanTable tbl = Luan.newTable(); tbl.put( "get_attribute", new LuanJavaFunction( HttpLuan.class.getMethod("get_session_attribute",String.class), this ) );