diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-02-08 14:39:42 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-02-08 14:39:42 -0200 |
commit | 74f1c3d025c6d8a714454470a953f383a1c6a641 (patch) | |
tree | cc89dfa109c64ed928217d777959ffc7ace12501 /lapi.c | |
parent | 1f691a4fcd32b706c79e4c8cbff17c6ae985bc34 (diff) | |
download | lua-74f1c3d025c6d8a714454470a953f383a1c6a641.tar.gz lua-74f1c3d025c6d8a714454470a953f383a1c6a641.tar.bz2 lua-74f1c3d025c6d8a714454470a953f383a1c6a641.zip |
small changes for "clean C"
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.69 2000/01/19 12:00:45 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.70 2000/01/24 20:14:07 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 | */ |
@@ -129,12 +129,13 @@ lua_Object lua_gettable (lua_State *L) { | |||
129 | 129 | ||
130 | 130 | ||
131 | lua_Object lua_rawgettable (lua_State *L) { | 131 | lua_Object lua_rawgettable (lua_State *L) { |
132 | lua_Object res; | ||
132 | luaA_checkCparams(L, 2); | 133 | luaA_checkCparams(L, 2); |
133 | if (ttype(L->top-2) != LUA_T_ARRAY) | 134 | if (ttype(L->top-2) != LUA_T_ARRAY) |
134 | lua_error(L, "indexed expression not a table in rawgettable"); | 135 | lua_error(L, "indexed expression not a table in rawgettable"); |
135 | *(L->top-2) = *luaH_get(L, avalue(L->top-2), L->top-1); | 136 | res = luaA_putluaObject(L, luaH_get(L, avalue(L->top-2), L->top-1)); |
136 | --L->top; | 137 | L->top -= 2; |
137 | return luaA_putObjectOnTop(L); | 138 | return res; |
138 | } | 139 | } |
139 | 140 | ||
140 | 141 | ||