Mercurial Hosting > luan
diff src/luan/interp/SetTableEntry.java @ 49:8ede219cd111
add WebShell
git-svn-id: https://luan-java.googlecode.com/svn/trunk@50 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Fri, 28 Dec 2012 19:35:04 +0000 |
parents | 64ecb7a3aad7 |
children | a68ccb7aaa9c |
line wrap: on
line diff
--- a/src/luan/interp/SetTableEntry.java Fri Dec 28 03:29:12 2012 +0000 +++ b/src/luan/interp/SetTableEntry.java Fri Dec 28 19:35:04 2012 +0000 @@ -17,31 +17,31 @@ this.keyExpr = keyExpr; } - @Override public void set(LuanStateImpl lua,Object value) throws LuanException { - newindex( lua, tableExpr.eval(lua), keyExpr.eval(lua), value ); + @Override public void set(LuanStateImpl luan,Object value) throws LuanException { + newindex( luan, tableExpr.eval(luan), keyExpr.eval(luan), value ); } - private void newindex(LuanStateImpl lua,Object t,Object key,Object value) throws LuanException { + private void newindex(LuanStateImpl luan,Object t,Object key,Object value) throws LuanException { Object h; if( t instanceof LuanTable ) { LuanTable table = (LuanTable)t; Object old = table.put(key,value); if( old != null ) return; - h = lua.getHandler("__newindex",t); + h = luan.getHandler("__newindex",t); if( h==null ) return; table.put(key,old); } else { - h = lua.getHandler("__newindex",t); + h = luan.getHandler("__newindex",t); if( h==null ) - throw new LuanException( lua, se, "attempt to index a " + Luan.type(t) + " value" ); + throw new LuanException( luan, se, "attempt to index a " + Luan.type(t) + " value" ); } if( h instanceof LuanFunction ) { LuanFunction fn = (LuanFunction)h; - lua.call(fn,se,"__newindex",t,key,value); + luan.call(fn,se,"__newindex",t,key,value); } - newindex(lua,h,key,value); + newindex(luan,h,key,value); } }