comparison core/src/luan/LuanMeta.java @ 428:df95199ca4c0

rename __newindex to __new_index
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 02 May 2015 20:10:31 -0600
parents dae264ad6a7b
children e3a6d9dbd694
comparison
equal deleted inserted replaced
427:dae264ad6a7b 428:df95199ca4c0
39 39
40 public boolean canNewindex() { 40 public boolean canNewindex() {
41 return false; 41 return false;
42 } 42 }
43 43
44 public void __newindex(LuanState luan,LuanTable tbl,Object key,Object value) throws LuanException { 44 public void __new_index(LuanState luan,LuanTable tbl,Object key,Object value) throws LuanException {
45 throw new UnsupportedOperationException(); 45 throw new UnsupportedOperationException();
46 } 46 }
47 47
48 protected abstract String type(LuanTable tbl); 48 protected abstract String type(LuanTable tbl);
49 49
55 LuanTable mt = new LuanTable(); 55 LuanTable mt = new LuanTable();
56 mt.rawPut( "__index", this ); 56 mt.rawPut( "__index", this );
57 mt.rawPut( "__pairs", this ); 57 mt.rawPut( "__pairs", this );
58 mt.rawPut( "__tostring", this ); 58 mt.rawPut( "__tostring", this );
59 if( canNewindex() ) 59 if( canNewindex() )
60 mt.rawPut( "__newindex", this ); 60 mt.rawPut( "__new_index", this );
61 return mt; 61 return mt;
62 } 62 }
63 63
64 public LuanTable newTable() { 64 public LuanTable newTable() {
65 LuanTable tbl = new LuanTable(); 65 LuanTable tbl = new LuanTable();