From ece042fef090fcccac0d046ad269714fa263925c Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 28 Nov 2011 15:26:30 -0200 Subject: 'table.pack' does not return 'n' (may be confusing when using table.pack as last argument in a call) --- ltablib.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ltablib.c b/ltablib.c index c1bd5ff0..527988a5 100644 --- a/ltablib.c +++ b/ltablib.c @@ -1,5 +1,5 @@ /* -** $Id: ltablib.c,v 1.61 2011/07/05 12:49:35 roberto Exp roberto $ +** $Id: ltablib.c,v 1.62 2011/09/30 12:45:45 roberto Exp roberto $ ** Library for Table Manipulation ** See Copyright Notice in lua.h */ @@ -129,8 +129,7 @@ static int pack (lua_State *L) { for (i = n; i >= 2; i--) /* assign other elements */ lua_rawseti(L, 1, i); } - lua_pushinteger(L, n); - return 2; /* return table and number of elements */ + return 1; /* return table */ } -- cgit v1.2.3-55-g6feb