new `__newindex' eventfield

This commit is contained in:
Roberto Ierusalimschy
2002-05-27 17:35:40 -03:00
parent 859ecf36b6
commit 46c471d7e9
8 changed files with 57 additions and 53 deletions

6
lapi.c
View File

@@ -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);
}