From b1141427991dea7a96597f2aacdedf243b60decd Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 26 Aug 2003 09:04:13 -0300 Subject: new auxiliary function `luaH_setstr' --- ldo.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ldo.c') diff --git a/ldo.c b/ldo.c index c6fd0b59..2b5dfdbf 100644 --- a/ldo.c +++ b/ldo.c @@ -1,5 +1,5 @@ /* -** $Id: ldo.c,v 1.221 2003/07/16 20:51:47 roberto Exp roberto $ +** $Id: ldo.c,v 1.222 2003/08/25 19:51:54 roberto Exp roberto $ ** Stack and Call structure of Lua ** See Copyright Notice in lua.h */ @@ -198,7 +198,6 @@ void luaD_callhook (lua_State *L, int event, int line) { static void adjust_varargs (lua_State *L, int nfixargs, StkId base) { int i; Table *htab; - TObject nname; int actual = L->top - base; /* actual number of arguments */ if (actual < nfixargs) { luaD_checkstack(L, nfixargs - actual); @@ -210,8 +209,8 @@ static void adjust_varargs (lua_State *L, int nfixargs, StkId base) { for (i=0; itop - actual + i); /* store counter in field `n' */ - setsvalue(&nname, luaS_newliteral(L, "n")); - setnvalue(luaH_set(L, htab, &nname), cast(lua_Number, actual)); + setnvalue(luaH_setstr(L, htab, luaS_newliteral(L, "n")), + cast(lua_Number, actual)); L->top -= actual; /* remove extra elements from the stack */ sethvalue(L->top, htab); incr_top(L); -- cgit v1.2.3-55-g6feb