diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-01-23 21:05:18 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-01-23 21:05:18 -0200 |
| commit | 9f1a8dbdd3ae7ec0b7ff5a916583f02135e21beb (patch) | |
| tree | 4d0e1181d5acd341221a5277f14c4d1924ac2e36 /lparser.c | |
| parent | d19f1da6effe07a48b64b226f9b193348da24801 (diff) | |
| download | lua-9f1a8dbdd3ae7ec0b7ff5a916583f02135e21beb.tar.gz lua-9f1a8dbdd3ae7ec0b7ff5a916583f02135e21beb.tar.bz2 lua-9f1a8dbdd3ae7ec0b7ff5a916583f02135e21beb.zip | |
'eqstr' -> 'luaS_eqstr'
Diffstat (limited to 'lparser.c')
| -rw-r--r-- | lparser.c | 16 |
1 files changed, 8 insertions, 8 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lparser.c,v 2.123 2011/11/30 12:43:51 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 2.124 2011/12/02 13:23:56 roberto Exp roberto $ |
| 3 | ** Lua Parser | 3 | ** Lua Parser |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -222,7 +222,7 @@ static int searchupvalue (FuncState *fs, TString *name) { | |||
| 222 | int i; | 222 | int i; |
| 223 | Upvaldesc *up = fs->f->upvalues; | 223 | Upvaldesc *up = fs->f->upvalues; |
| 224 | for (i = 0; i < fs->nups; i++) { | 224 | for (i = 0; i < fs->nups; i++) { |
| 225 | if (eqstr(up[i].name, name)) return i; | 225 | if (luaS_eqstr(up[i].name, name)) return i; |
| 226 | } | 226 | } |
| 227 | return -1; /* not found */ | 227 | return -1; /* not found */ |
| 228 | } | 228 | } |
| @@ -246,7 +246,7 @@ static int newupvalue (FuncState *fs, TString *name, expdesc *v) { | |||
| 246 | static int searchvar (FuncState *fs, TString *n) { | 246 | static int searchvar (FuncState *fs, TString *n) { |
| 247 | int i; | 247 | int i; |
| 248 | for (i=fs->nactvar-1; i >= 0; i--) { | 248 | for (i=fs->nactvar-1; i >= 0; i--) { |
| 249 | if (eqstr(n, getlocvar(fs, i)->varname)) | 249 | if (luaS_eqstr(n, getlocvar(fs, i)->varname)) |
| 250 | return i; | 250 | return i; |
| 251 | } | 251 | } |
| 252 | return -1; /* not found */ | 252 | return -1; /* not found */ |
| @@ -342,7 +342,7 @@ static void closegoto (LexState *ls, int g, Labeldesc *label) { | |||
| 342 | FuncState *fs = ls->fs; | 342 | FuncState *fs = ls->fs; |
| 343 | Labellist *gl = &ls->dyd->gt; | 343 | Labellist *gl = &ls->dyd->gt; |
| 344 | Labeldesc *gt = &gl->arr[g]; | 344 | Labeldesc *gt = &gl->arr[g]; |
| 345 | lua_assert(eqstr(gt->name, label->name)); | 345 | lua_assert(luaS_eqstr(gt->name, label->name)); |
| 346 | if (gt->nactvar < label->nactvar) { | 346 | if (gt->nactvar < label->nactvar) { |
| 347 | TString *vname = getlocvar(fs, gt->nactvar)->varname; | 347 | TString *vname = getlocvar(fs, gt->nactvar)->varname; |
| 348 | const char *msg = luaO_pushfstring(ls->L, | 348 | const char *msg = luaO_pushfstring(ls->L, |
| @@ -369,7 +369,7 @@ static int findlabel (LexState *ls, int g) { | |||
| 369 | /* check labels in current block for a match */ | 369 | /* check labels in current block for a match */ |
| 370 | for (i = bl->firstlabel; i < dyd->label.n; i++) { | 370 | for (i = bl->firstlabel; i < dyd->label.n; i++) { |
| 371 | Labeldesc *lb = &dyd->label.arr[i]; | 371 | Labeldesc *lb = &dyd->label.arr[i]; |
| 372 | if (eqstr(lb->name, gt->name)) { /* correct label? */ | 372 | if (luaS_eqstr(lb->name, gt->name)) { /* correct label? */ |
| 373 | if (gt->nactvar > lb->nactvar && | 373 | if (gt->nactvar > lb->nactvar && |
| 374 | (bl->upval || dyd->label.n > bl->firstlabel)) | 374 | (bl->upval || dyd->label.n > bl->firstlabel)) |
| 375 | luaK_patchclose(ls->fs, gt->pc, lb->nactvar); | 375 | luaK_patchclose(ls->fs, gt->pc, lb->nactvar); |
| @@ -403,7 +403,7 @@ static void findgotos (LexState *ls, Labeldesc *lb) { | |||
| 403 | Labellist *gl = &ls->dyd->gt; | 403 | Labellist *gl = &ls->dyd->gt; |
| 404 | int i = ls->fs->bl->firstgoto; | 404 | int i = ls->fs->bl->firstgoto; |
| 405 | while (i < gl->n) { | 405 | while (i < gl->n) { |
| 406 | if (eqstr(gl->arr[i].name, lb->name)) | 406 | if (luaS_eqstr(gl->arr[i].name, lb->name)) |
| 407 | closegoto(ls, i, lb); | 407 | closegoto(ls, i, lb); |
| 408 | else | 408 | else |
| 409 | i++; | 409 | i++; |
| @@ -461,7 +461,7 @@ static void breaklabel (LexState *ls) { | |||
| 461 | ** message when label name is a reserved word (which can only be 'break') | 461 | ** message when label name is a reserved word (which can only be 'break') |
| 462 | */ | 462 | */ |
| 463 | static l_noret undefgoto (LexState *ls, Labeldesc *gt) { | 463 | static l_noret undefgoto (LexState *ls, Labeldesc *gt) { |
| 464 | const char *msg = (gt->name->tsv.reserved > 0) | 464 | const char *msg = isreserved(gt->name) |
| 465 | ? "<%s> at line %d not inside a loop" | 465 | ? "<%s> at line %d not inside a loop" |
| 466 | : "no visible label " LUA_QS " for <goto> at line %d"; | 466 | : "no visible label " LUA_QS " for <goto> at line %d"; |
| 467 | msg = luaO_pushfstring(ls->L, msg, getstr(gt->name), gt->line); | 467 | msg = luaO_pushfstring(ls->L, msg, getstr(gt->name), gt->line); |
| @@ -1200,7 +1200,7 @@ static void gotostat (LexState *ls, int pc) { | |||
| 1200 | static void checkrepeated (FuncState *fs, Labellist *ll, TString *label) { | 1200 | static void checkrepeated (FuncState *fs, Labellist *ll, TString *label) { |
| 1201 | int i; | 1201 | int i; |
| 1202 | for (i = fs->bl->firstlabel; i < ll->n; i++) { | 1202 | for (i = fs->bl->firstlabel; i < ll->n; i++) { |
| 1203 | if (eqstr(label, ll->arr[i].name)) { | 1203 | if (luaS_eqstr(label, ll->arr[i].name)) { |
| 1204 | const char *msg = luaO_pushfstring(fs->ls->L, | 1204 | const char *msg = luaO_pushfstring(fs->ls->L, |
| 1205 | "label " LUA_QS " already defined on line %d", | 1205 | "label " LUA_QS " already defined on line %d", |
| 1206 | getstr(label), ll->arr[i].line); | 1206 | getstr(label), ll->arr[i].line); |
