diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-07-18 09:17:54 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-07-18 09:17:54 -0300 |
| commit | 56137d58ff7abe8cb22ee3469366e08888c84f28 (patch) | |
| tree | 6769e3c2403a69cf3f0d6dbf6fb4acb7442367e0 /llex.c | |
| parent | 9aec500a2691d2b13c307d143868c8a4fab33220 (diff) | |
| download | lua-56137d58ff7abe8cb22ee3469366e08888c84f28.tar.gz lua-56137d58ff7abe8cb22ee3469366e08888c84f28.tar.bz2 lua-56137d58ff7abe8cb22ee3469366e08888c84f28.zip | |
added check for conversion 'obj2gco' (and corrections for small
problems detected by this check)
Diffstat (limited to 'llex.c')
| -rw-r--r-- | llex.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: llex.c,v 2.77 2014/05/11 14:45:43 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 2.78 2014/05/21 15:22:02 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 | */ |
| @@ -67,10 +67,10 @@ static void save (LexState *ls, int c) { | |||
| 67 | void luaX_init (lua_State *L) { | 67 | void luaX_init (lua_State *L) { |
| 68 | int i; | 68 | int i; |
| 69 | TString *e = luaS_new(L, LUA_ENV); /* create env name */ | 69 | TString *e = luaS_new(L, LUA_ENV); /* create env name */ |
| 70 | luaC_fix(L, obj2gco(e)); /* never collect this name */ | 70 | luaC_fix(L, ts2gco(e)); /* never collect this name */ |
| 71 | for (i=0; i<NUM_RESERVED; i++) { | 71 | for (i=0; i<NUM_RESERVED; i++) { |
| 72 | TString *ts = luaS_new(L, luaX_tokens[i]); | 72 | TString *ts = luaS_new(L, luaX_tokens[i]); |
| 73 | luaC_fix(L, obj2gco(ts)); /* reserved words are never collected */ | 73 | luaC_fix(L, ts2gco(ts)); /* reserved words are never collected */ |
| 74 | ts->tsv.extra = cast_byte(i+1); /* reserved word */ | 74 | ts->tsv.extra = cast_byte(i+1); /* reserved word */ |
| 75 | } | 75 | } |
| 76 | } | 76 | } |
