diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-06-18 13:57:03 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-06-18 13:57:03 -0300 |
| commit | c9902be294f5c2dca8a67a67fd324f91e4352c0a (patch) | |
| tree | 3f3ef43d231334ee60c13bf310f7995845e97cab /llex.c | |
| parent | 112c9d53ab47e77fd09d4ecb9b11d432ed906c88 (diff) | |
| download | lua-c9902be294f5c2dca8a67a67fd324f91e4352c0a.tar.gz lua-c9902be294f5c2dca8a67a67fd324f91e4352c0a.tar.bz2 lua-c9902be294f5c2dca8a67a67fd324f91e4352c0a.zip | |
"findname" moved from lobject.c to lauxlib.c (so libraries may use it).
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 1.19 1998/05/27 13:03:40 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 1.20 1998/06/06 20:44:05 roberto Exp roberto $ |
| 3 | ** Lexical Analizer | 3 | ** Lexical Analizer |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -118,7 +118,7 @@ static void skipspace (LexState *LS) | |||
| 118 | static int checkcond (LexState *LS, char *buff) | 118 | static int checkcond (LexState *LS, char *buff) |
| 119 | { | 119 | { |
| 120 | static char *opts[] = {"nil", "1", NULL}; | 120 | static char *opts[] = {"nil", "1", NULL}; |
| 121 | int i = luaO_findstring(buff, opts); | 121 | int i = luaL_findstring(buff, opts); |
| 122 | if (i >= 0) return i; | 122 | if (i >= 0) return i; |
| 123 | else if (isalpha((unsigned char)buff[0]) || buff[0] == '_') | 123 | else if (isalpha((unsigned char)buff[0]) || buff[0] == '_') |
| 124 | return luaS_globaldefined(buff); | 124 | return luaS_globaldefined(buff); |
| @@ -172,7 +172,7 @@ static void inclinenumber (LexState *LS) | |||
| 172 | int skip = LS->ifstate[LS->iflevel].skip; | 172 | int skip = LS->ifstate[LS->iflevel].skip; |
| 173 | next(LS); /* skip $ */ | 173 | next(LS); /* skip $ */ |
| 174 | readname(LS, buff); | 174 | readname(LS, buff); |
| 175 | switch (luaO_findstring(buff, pragmas)) { | 175 | switch (luaL_findstring(buff, pragmas)) { |
| 176 | case 0: /* debug */ | 176 | case 0: /* debug */ |
| 177 | if (!skip) lua_debug = 1; | 177 | if (!skip) lua_debug = 1; |
| 178 | break; | 178 | break; |
