diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-10 16:56:11 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-01-10 16:56:11 -0200 |
| commit | dabb19fc17acee55f9052c5d17ec07360cec809d (patch) | |
| tree | 76983221f936eee7e681559093b3b23f8968e711 /lapi.c | |
| parent | 08496eea8b277d37c4de9cf75a011715ad6a4100 (diff) | |
| download | lua-dabb19fc17acee55f9052c5d17ec07360cec809d.tar.gz lua-dabb19fc17acee55f9052c5d17ec07360cec809d.tar.bz2 lua-dabb19fc17acee55f9052c5d17ec07360cec809d.zip | |
specialized versions for luaH_set (numbers and strings)
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.114 2000/12/28 12:55:41 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.115 2001/01/10 17:41:50 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 | */ |
| @@ -267,7 +267,7 @@ LUA_API void lua_gettable (lua_State *L, int index) { | |||
| 267 | LUA_API void lua_rawget (lua_State *L, int index) { | 267 | LUA_API void lua_rawget (lua_State *L, int index) { |
| 268 | StkId t = Index(L, index); | 268 | StkId t = Index(L, index); |
| 269 | LUA_ASSERT(ttype(t) == LUA_TTABLE, "table expected"); | 269 | LUA_ASSERT(ttype(t) == LUA_TTABLE, "table expected"); |
| 270 | *(L->top - 1) = *luaH_get(L, hvalue(t), L->top - 1); | 270 | *(L->top - 1) = *luaH_get(hvalue(t), L->top - 1); |
| 271 | } | 271 | } |
| 272 | 272 | ||
| 273 | 273 | ||
| @@ -338,7 +338,7 @@ LUA_API void lua_rawset (lua_State *L, int index) { | |||
| 338 | LUA_API void lua_rawseti (lua_State *L, int index, int n) { | 338 | LUA_API void lua_rawseti (lua_State *L, int index, int n) { |
| 339 | StkId o = Index(L, index); | 339 | StkId o = Index(L, index); |
| 340 | LUA_ASSERT(ttype(o) == LUA_TTABLE, "table expected"); | 340 | LUA_ASSERT(ttype(o) == LUA_TTABLE, "table expected"); |
| 341 | *luaH_setint(L, hvalue(o), n) = *(L->top-1); | 341 | *luaH_setnum(L, hvalue(o), n) = *(L->top-1); |
| 342 | L->top--; | 342 | L->top--; |
| 343 | } | 343 | } |
| 344 | 344 | ||
