Mercurial Hosting > luan
comparison core/src/luan/LuanMeta.java @ 408:1b38de2b1845
merge LuanTableImpl into LuanTable
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 29 Apr 2015 13:15:17 -0600 |
parents | 3e68917a0dc6 |
children | 8937263f59f6 |
comparison
equal
deleted
inserted
replaced
407:7fd9f1b7b878 | 408:1b38de2b1845 |
---|---|
16 public void __newindex(LuanState luan,LuanTable tbl,Object key,Object value) throws LuanException { | 16 public void __newindex(LuanState luan,LuanTable tbl,Object key,Object value) throws LuanException { |
17 throw new UnsupportedOperationException(); | 17 throw new UnsupportedOperationException(); |
18 } | 18 } |
19 | 19 |
20 public LuanTable newMetatable() { | 20 public LuanTable newMetatable() { |
21 LuanTable mt = new LuanTableImpl(); | 21 LuanTable mt = new LuanTable(); |
22 /* | 22 /* |
23 try { | 23 try { |
24 mt.put( "__index", new LuanJavaFunction( | 24 mt.put( "__index", new LuanJavaFunction( |
25 LuanMeta.class.getMethod( "__index", LuanState.class, LuanTable.class, Object.class ), this | 25 LuanMeta.class.getMethod( "__index", LuanState.class, LuanTable.class, Object.class ), this |
26 ) ); | 26 ) ); |
39 mt.put( "__newindex", this ); | 39 mt.put( "__newindex", this ); |
40 return mt; | 40 return mt; |
41 } | 41 } |
42 | 42 |
43 public LuanTable newTable() { | 43 public LuanTable newTable() { |
44 LuanTable tbl = new LuanTableImpl(); | 44 LuanTable tbl = new LuanTable(); |
45 tbl.setMetatable( newMetatable() ); | 45 tbl.setMetatable( newMetatable() ); |
46 return tbl; | 46 return tbl; |
47 } | 47 } |
48 } | 48 } |