Mercurial Hosting > luan
diff core/src/luan/modules/TableLuan.java @ 274:8afe9f2fdfec
AB testing, not fully tested
git-svn-id: https://luan-java.googlecode.com/svn/trunk@275 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Mon, 10 Nov 2014 03:28:32 +0000 |
parents | b76fcb72d97d |
children | 899253043270 |
line wrap: on
line diff
--- a/core/src/luan/modules/TableLuan.java Fri Oct 31 18:44:11 2014 +0000 +++ b/core/src/luan/modules/TableLuan.java Mon Nov 10 03:28:32 2014 +0000 @@ -20,6 +20,7 @@ @Override public Object call(LuanState luan,Object[] args) { LuanTable module = Luan.newTable(); try { + add( module, "clone", LuanTable.class ); add( module, "concat", LuanState.class, LuanTable.class, String.class, Integer.class, Integer.class ); add( module, "insert", LuanTable.class, Integer.TYPE, Object.class ); add( module, "pack", new Object[0].getClass() ); @@ -133,4 +134,8 @@ return list.subList(from,to); } + public static LuanTable clone(LuanTable tbl) { + return tbl.cloneTable(); + } + }