From 5e4ea9a831b1c1538a2a8b1250336f3954c74319 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 15 Jun 2004 10:37:21 -0300 Subject: `setn' returns its "self" (the table) --- ltablib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ltablib.c b/ltablib.c index f051742d..d5c3e37c 100644 --- a/ltablib.c +++ b/ltablib.c @@ -1,5 +1,5 @@ /* -** $Id: ltablib.c,v 1.24 2004/05/10 17:50:51 roberto Exp roberto $ +** $Id: ltablib.c,v 1.25 2004/05/10 18:06:14 roberto Exp roberto $ ** Library for Table Manipulation ** See Copyright Notice in lua.h */ @@ -63,7 +63,8 @@ static int luaB_getn (lua_State *L) { static int luaB_setn (lua_State *L) { luaL_checktype(L, 1, LUA_TTABLE); luaL_setn(L, 1, luaL_checkint(L, 2)); - return 0; + lua_pushvalue(L, 1); + return 1; } -- cgit v1.2.3-55-g6feb