diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-16 14:03:48 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-16 14:03:48 -0200 |
| commit | 94686ce58554a80374eeff115ee5b87c184ed173 (patch) | |
| tree | 9b41f32a05a41f7063df180015c13c5d9ae1d4a0 /table.c | |
| parent | 86b35cf4f6a824880239069d0afe282e95806aaa (diff) | |
| download | lua-github-94686ce58554a80374eeff115ee5b87c184ed173.tar.gz | |
correction of function 'nextvar'
Diffstat (limited to 'table.c')
| -rw-r--r-- | table.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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 <stdlib.h> #include <string.h> @@ -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)); } } |
