From 94686ce58554a80374eeff115ee5b87c184ed173 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 16 Nov 1994 14:03:48 -0200 Subject: correction of function 'nextvar' --- table.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'table.c') diff --git a/table.c b/table.c index 20ab6046..d37b7b03 100644 --- a/table.c +++ b/table.c @@ -3,7 +3,7 @@ ** Module to control static tables */ -char *rcs_table="$Id: table.c,v 2.16 1994/11/11 14:00:08 roberto Exp roberto $"; +char *rcs_table="$Id: table.c,v 2.17 1994/11/14 21:40:14 roberto Exp $"; #include #include @@ -41,6 +41,8 @@ Word lua_nentity; /* counter of new entities (strings and arrays) */ Word lua_recovered; /* counter of recovered entities (strings and arrays) */ +static void lua_nextvar (void); + /* ** Initialise symbol table with internal functions */ @@ -239,9 +241,10 @@ char *lua_filename (void) /* ** Internal function: return next global variable */ -void lua_nextvar (void) +static void lua_nextvar (void) { - char *varname, *next; + char *varname; + TreeNode *next; lua_Object o = lua_getparam(1); if (o == 0) lua_error ("too few arguments to function `nextvar'"); @@ -266,8 +269,8 @@ void lua_nextvar (void) { Object name; tag(&name) = LUA_T_STRING; - svalue(&name) = next; + svalue(&name) = next->str; luaI_pushobject(&name); - luaI_pushobject(&s_object(indexstring(next))); + luaI_pushobject(&s_object(next->varindex)); } } -- cgit v1.2.3-55-g6feb