diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-06-15 17:36:57 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-06-15 17:36:57 -0300 |
commit | 8e586c13fcf3066886a7edd69011304eaad57a2b (patch) | |
tree | 417c2102ba8c4d693c49a2df839612d371eded50 /llex.c | |
parent | eadf2aaaffa7a35e7f67b150ce0d57f2c17b9231 (diff) | |
download | lua-github-8e586c13fcf3066886a7edd69011304eaad57a2b.tar.gz |
cleaner way to ensure alignment for strings and userdata
Diffstat (limited to 'llex.c')
-rw-r--r-- | llex.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ /* -** $Id: llex.c,v 1.85 2001/06/07 15:01:21 roberto Exp roberto $ +** $Id: llex.c,v 1.86 2001/06/13 14:25:49 roberto Exp roberto $ ** Lexical Analyzer ** See Copyright Notice in lua.h */ @@ -40,7 +40,7 @@ void luaX_init (lua_State *L) { for (i=0; i<NUM_RESERVED; i++) { TString *ts = luaS_new(L, token2string[i]); lua_assert(strlen(token2string[i])+1 <= TOKEN_LEN); - ts->marked = (unsigned short)(RESERVEDMARK+i); /* reserved word */ + ts->tsv.marked = (unsigned short)(RESERVEDMARK+i); /* reserved word */ } } @@ -370,8 +370,8 @@ int luaX_lex (LexState *LS, SemInfo *seminfo) { /* identifier or reserved word */ size_t l = readname(LS); TString *ts = luaS_newlstr(LS->L, (l_char *)G(LS->L)->Mbuffer, l); - if (ts->marked >= RESERVEDMARK) /* reserved word? */ - return ts->marked-RESERVEDMARK+FIRST_RESERVED; + if (ts->tsv.marked >= RESERVEDMARK) /* reserved word? */ + return ts->tsv.marked-RESERVEDMARK+FIRST_RESERVED; seminfo->ts = ts; return TK_NAME; } |