From a580480b07cdf7201306b246deeb2fe84f2c25a9 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 26 Sep 1997 12:02:26 -0300 Subject: new implementation for globals: Global value is stored in TaggedString --- lua.stx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lua.stx') diff --git a/lua.stx b/lua.stx index dfb80ce3..2f650f4e 100644 --- a/lua.stx +++ b/lua.stx @@ -1,6 +1,6 @@ %{ /* -** $Id: lua.stx,v 1.4 1997/09/22 20:53:20 roberto Exp roberto $ +** $Id: lua.stx,v 1.5 1997/09/24 19:43:11 roberto Exp roberto $ ** Syntax analizer and code generator ** See Copyright Notice in lua.h */ @@ -203,13 +203,13 @@ static int next_constant (State *cs) static int string_constant (TaggedString *s, State *cs) { TProtoFunc *f = cs->f; - int c = s->u.s.constindex; - if (!(0 <= c && c < f->nconsts && + int c = s->constindex; + if (!(c < f->nconsts && ttype(&f->consts[c]) == LUA_T_STRING && tsvalue(&f->consts[c]) == s)) { c = next_constant(cs); ttype(&f->consts[c]) = LUA_T_STRING; tsvalue(&f->consts[c]) = s; - s->u.s.constindex = c; /* hint for next time */ + s->constindex = c; /* hint for next time */ } return c; } -- cgit v1.2.3-55-g6feb