diff options
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.51 1999/10/04 17:51:04 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.52 1999/10/07 19:04:30 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -393,11 +393,11 @@ TaggedString *luaA_nextvar (TaggedString *g) { | |||
393 | g = L->rootglobal; /* first variable */ | 393 | g = L->rootglobal; /* first variable */ |
394 | else { | 394 | else { |
395 | /* check whether name is in global var list */ | 395 | /* check whether name is in global var list */ |
396 | luaL_arg_check(g != g->next, 1, "variable name expected"); | 396 | luaL_arg_check(g != g->nextglobal, 1, "variable name expected"); |
397 | g = g->next; /* get next */ | 397 | g = g->nextglobal; /* get next */ |
398 | } | 398 | } |
399 | while (g && g->u.s.globalval.ttype == LUA_T_NIL) /* skip globals with nil */ | 399 | while (g && g->u.s.globalval.ttype == LUA_T_NIL) /* skip globals with nil */ |
400 | g = g->next; | 400 | g = g->nextglobal; |
401 | if (g) { | 401 | if (g) { |
402 | ttype(L->stack.top) = LUA_T_STRING; tsvalue(L->stack.top) = g; | 402 | ttype(L->stack.top) = LUA_T_STRING; tsvalue(L->stack.top) = g; |
403 | incr_top; | 403 | incr_top; |
@@ -579,7 +579,7 @@ const char *lua_getobjname (lua_Object o, const char **name) { | |||
579 | /* try to find a name for given function */ | 579 | /* try to find a name for given function */ |
580 | TaggedString *g; | 580 | TaggedString *g; |
581 | set_normalized(L->stack.top, Address(o)); /* to be accessed by "checkfunc" */ | 581 | set_normalized(L->stack.top, Address(o)); /* to be accessed by "checkfunc" */ |
582 | for (g=L->rootglobal; g; g=g->next) { | 582 | for (g=L->rootglobal; g; g=g->nextglobal) { |
583 | if (checkfunc(&g->u.s.globalval)) { | 583 | if (checkfunc(&g->u.s.globalval)) { |
584 | *name = g->str; | 584 | *name = g->str; |
585 | return "global"; | 585 | return "global"; |