aboutsummaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-10-04 15:51:04 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-10-04 15:51:04 -0200
commit4343420d4d559a7d4cdacdbc1fd61552dcf59f04 (patch)
tree57e0bdd41e2f3a4ab70d3150022569751e3d02ad /llex.c
parent1f7103e05d01a6a4c300a73bcfc8d9b17b2c20a4 (diff)
downloadlua-4343420d4d559a7d4cdacdbc1fd61552dcf59f04.tar.gz
lua-4343420d4d559a7d4cdacdbc1fd61552dcf59f04.tar.bz2
lua-4343420d4d559a7d4cdacdbc1fd61552dcf59f04.zip
simplified version of `gc' tag method (only for userdata now).
Diffstat (limited to 'llex.c')
-rw-r--r--llex.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/llex.c b/llex.c
index 09891b61..54213e9c 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 1.38 1999/08/16 20:52:00 roberto Exp roberto $ 2** $Id: llex.c,v 1.39 1999/09/06 13:55:09 roberto Exp roberto $
3** Lexical Analyzer 3** Lexical Analyzer
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -37,7 +37,7 @@ void luaX_init (void) {
37 int i; 37 int i;
38 for (i=0; i<(sizeof(reserved)/sizeof(reserved[0])); i++) { 38 for (i=0; i<(sizeof(reserved)/sizeof(reserved[0])); i++) {
39 TaggedString *ts = luaS_new(reserved[i]); 39 TaggedString *ts = luaS_new(reserved[i]);
40 ts->head.marked = FIRST_RESERVED+i; /* reserved word (always > 255) */ 40 ts->marked = FIRST_RESERVED+i; /* reserved word (always > 255) */
41 } 41 }
42} 42}
43 43
@@ -426,8 +426,8 @@ int luaX_lex (LexState *LS) {
426 } while (isalnum(LS->current) || LS->current == '_'); 426 } while (isalnum(LS->current) || LS->current == '_');
427 save('\0'); 427 save('\0');
428 ts = luaS_new(L->Mbuffer+L->Mbuffbase); 428 ts = luaS_new(L->Mbuffer+L->Mbuffbase);
429 if (ts->head.marked >= FIRST_RESERVED) 429 if (ts->marked >= FIRST_RESERVED)
430 return ts->head.marked; /* reserved word */ 430 return ts->marked; /* reserved word */
431 LS->seminfo.ts = ts; 431 LS->seminfo.ts = ts;
432 return NAME; 432 return NAME;
433 } 433 }