Mercurial Hosting > luan
comparison src/luan/lib/TableLib.java @ 77:4bf3d0c0b6b9
make LuanState cloneable
git-svn-id: https://luan-java.googlecode.com/svn/trunk@78 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Fri, 15 Feb 2013 09:55:17 +0000 |
parents | 97b03fc807ad |
children | 6db8f286fa6c |
comparison
equal
deleted
inserted
replaced
76:97b03fc807ad | 77:4bf3d0c0b6b9 |
---|---|
18 public static final String NAME = "table"; | 18 public static final String NAME = "table"; |
19 | 19 |
20 public static final LuanFunction LOADER = new LuanFunction() { | 20 public static final LuanFunction LOADER = new LuanFunction() { |
21 public Object[] call(LuanState luan,Object[] args) throws LuanException { | 21 public Object[] call(LuanState luan,Object[] args) throws LuanException { |
22 LuanTable module = new LuanTable(); | 22 LuanTable module = new LuanTable(); |
23 LuanTable global = luan.global; | 23 LuanTable global = luan.global(); |
24 try { | 24 try { |
25 add( module, "concat", LuanState.class, LuanTable.class, String.class, Integer.class, Integer.class ); | 25 add( module, "concat", LuanState.class, LuanTable.class, String.class, Integer.class, Integer.class ); |
26 add( module, "insert", LuanState.class, LuanTable.class, Integer.TYPE, Object.class ); | 26 add( module, "insert", LuanState.class, LuanTable.class, Integer.TYPE, Object.class ); |
27 add( module, "pack", new Object[0].getClass() ); | 27 add( module, "pack", new Object[0].getClass() ); |
28 add( module, "remove", LuanState.class, LuanTable.class, Integer.TYPE ); | 28 add( module, "remove", LuanState.class, LuanTable.class, Integer.TYPE ); |