diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-05-27 17:35:40 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-05-27 17:35:40 -0300 |
commit | 46c471d7e97292d923721655683affd7e8b314de (patch) | |
tree | c9ae53cc94b1cca209fd5af7f594d355d6c111a9 /lapi.c | |
parent | 859ecf36b6f96a5a0961f09c00cd98088081384c (diff) | |
download | lua-46c471d7e97292d923721655683affd7e8b314de.tar.gz lua-46c471d7e97292d923721655683affd7e8b314de.tar.bz2 lua-46c471d7e97292d923721655683affd7e8b314de.zip |
new `__newindex' eventfield
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.191 2002/05/15 18:57:44 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.192 2002/05/16 18:39:46 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -500,7 +500,7 @@ LUA_API void lua_rawset (lua_State *L, int index) { | |||
500 | api_checknelems(L, 2); | 500 | api_checknelems(L, 2); |
501 | t = luaA_index(L, index); | 501 | t = luaA_index(L, index); |
502 | api_check(L, ttype(t) == LUA_TTABLE); | 502 | api_check(L, ttype(t) == LUA_TTABLE); |
503 | luaH_set(L, hvalue(t), L->top-2, L->top-1); | 503 | setobj(luaH_set(L, hvalue(t), L->top-2), L->top-1); |
504 | L->top -= 2; | 504 | L->top -= 2; |
505 | lua_unlock(L); | 505 | lua_unlock(L); |
506 | } | 506 | } |
@@ -512,7 +512,7 @@ LUA_API void lua_rawseti (lua_State *L, int index, int n) { | |||
512 | api_checknelems(L, 1); | 512 | api_checknelems(L, 1); |
513 | o = luaA_index(L, index); | 513 | o = luaA_index(L, index); |
514 | api_check(L, ttype(o) == LUA_TTABLE); | 514 | api_check(L, ttype(o) == LUA_TTABLE); |
515 | luaH_setnum(L, hvalue(o), n, L->top-1); | 515 | setobj(luaH_setnum(L, hvalue(o), n), L->top-1); |
516 | L->top--; | 516 | L->top--; |
517 | lua_unlock(L); | 517 | lua_unlock(L); |
518 | } | 518 | } |