added check for conversion 'obj2gco' (and corrections for small
problems detected by this check)
This commit is contained in:
6
llex.c
6
llex.c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: llex.c,v 2.77 2014/05/11 14:45:43 roberto Exp roberto $
|
||||
** $Id: llex.c,v 2.78 2014/05/21 15:22:02 roberto Exp roberto $
|
||||
** Lexical Analyzer
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@@ -67,10 +67,10 @@ static void save (LexState *ls, int c) {
|
||||
void luaX_init (lua_State *L) {
|
||||
int i;
|
||||
TString *e = luaS_new(L, LUA_ENV); /* create env name */
|
||||
luaC_fix(L, obj2gco(e)); /* never collect this name */
|
||||
luaC_fix(L, ts2gco(e)); /* never collect this name */
|
||||
for (i=0; i<NUM_RESERVED; i++) {
|
||||
TString *ts = luaS_new(L, luaX_tokens[i]);
|
||||
luaC_fix(L, obj2gco(ts)); /* reserved words are never collected */
|
||||
luaC_fix(L, ts2gco(ts)); /* reserved words are never collected */
|
||||
ts->tsv.extra = cast_byte(i+1); /* reserved word */
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user