diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-06-15 10:37:21 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-06-15 10:37:21 -0300 |
commit | 5e4ea9a831b1c1538a2a8b1250336f3954c74319 (patch) | |
tree | c058e75706f81bb37553a1b3053906f06f3e715c /ltablib.c | |
parent | 6311e3109f4eb9a356b28d471e82d130d1198647 (diff) | |
download | lua-5e4ea9a831b1c1538a2a8b1250336f3954c74319.tar.gz lua-5e4ea9a831b1c1538a2a8b1250336f3954c74319.tar.bz2 lua-5e4ea9a831b1c1538a2a8b1250336f3954c74319.zip |
`setn' returns its "self" (the table)
Diffstat (limited to 'ltablib.c')
-rw-r--r-- | ltablib.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltablib.c,v 1.24 2004/05/10 17:50:51 roberto Exp roberto $ | 2 | ** $Id: ltablib.c,v 1.25 2004/05/10 18:06:14 roberto Exp roberto $ |
3 | ** Library for Table Manipulation | 3 | ** Library for Table Manipulation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -63,7 +63,8 @@ static int luaB_getn (lua_State *L) { | |||
63 | static int luaB_setn (lua_State *L) { | 63 | static int luaB_setn (lua_State *L) { |
64 | luaL_checktype(L, 1, LUA_TTABLE); | 64 | luaL_checktype(L, 1, LUA_TTABLE); |
65 | luaL_setn(L, 1, luaL_checkint(L, 2)); | 65 | luaL_setn(L, 1, luaL_checkint(L, 2)); |
66 | return 0; | 66 | lua_pushvalue(L, 1); |
67 | return 1; | ||
67 | } | 68 | } |
68 | 69 | ||
69 | 70 | ||