new `__newindex' eventfield
This commit is contained in:
6
lapi.c
6
lapi.c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lapi.c,v 1.191 2002/05/15 18:57:44 roberto Exp roberto $
|
||||
** $Id: lapi.c,v 1.192 2002/05/16 18:39:46 roberto Exp roberto $
|
||||
** Lua API
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@@ -500,7 +500,7 @@ LUA_API void lua_rawset (lua_State *L, int index) {
|
||||
api_checknelems(L, 2);
|
||||
t = luaA_index(L, index);
|
||||
api_check(L, ttype(t) == LUA_TTABLE);
|
||||
luaH_set(L, hvalue(t), L->top-2, L->top-1);
|
||||
setobj(luaH_set(L, hvalue(t), L->top-2), L->top-1);
|
||||
L->top -= 2;
|
||||
lua_unlock(L);
|
||||
}
|
||||
@@ -512,7 +512,7 @@ LUA_API void lua_rawseti (lua_State *L, int index, int n) {
|
||||
api_checknelems(L, 1);
|
||||
o = luaA_index(L, index);
|
||||
api_check(L, ttype(o) == LUA_TTABLE);
|
||||
luaH_setnum(L, hvalue(o), n, L->top-1);
|
||||
setobj(luaH_setnum(L, hvalue(o), n), L->top-1);
|
||||
L->top--;
|
||||
lua_unlock(L);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user