aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2012-01-23 21:05:18 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2012-01-23 21:05:18 -0200
commit9f1a8dbdd3ae7ec0b7ff5a916583f02135e21beb (patch)
tree4d0e1181d5acd341221a5277f14c4d1924ac2e36
parentd19f1da6effe07a48b64b226f9b193348da24801 (diff)
downloadlua-9f1a8dbdd3ae7ec0b7ff5a916583f02135e21beb.tar.gz
lua-9f1a8dbdd3ae7ec0b7ff5a916583f02135e21beb.tar.bz2
lua-9f1a8dbdd3ae7ec0b7ff5a916583f02135e21beb.zip
'eqstr' -> 'luaS_eqstr'
-rw-r--r--lparser.c16
-rw-r--r--ltable.c4
-rw-r--r--lvm.c6
3 files changed, 13 insertions, 13 deletions
diff --git a/lparser.c b/lparser.c
index a1b1b84c..226a0078 100644
--- a/lparser.c
+++ b/lparser.c
@@ -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) {
246static int searchvar (FuncState *fs, TString *n) { 246static 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*/
463static l_noret undefgoto (LexState *ls, Labeldesc *gt) { 463static 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) {
1200static void checkrepeated (FuncState *fs, Labellist *ll, TString *label) { 1200static 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);
diff --git a/ltable.c b/ltable.c
index 86bfa792..ce740ebe 100644
--- a/ltable.c
+++ b/ltable.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.c,v 2.66 2011/11/28 17:25:48 roberto Exp roberto $ 2** $Id: ltable.c,v 2.67 2011/11/30 12:41:45 roberto Exp roberto $
3** Lua tables (hash) 3** Lua tables (hash)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -458,7 +458,7 @@ const TValue *luaH_getint (Table *t, int key) {
458const TValue *luaH_getstr (Table *t, TString *key) { 458const TValue *luaH_getstr (Table *t, TString *key) {
459 Node *n = hashstr(t, key); 459 Node *n = hashstr(t, key);
460 do { /* check whether `key' is somewhere in the chain */ 460 do { /* check whether `key' is somewhere in the chain */
461 if (ttisstring(gkey(n)) && eqstr(rawtsvalue(gkey(n)), key)) 461 if (ttisstring(gkey(n)) && luaS_eqstr(rawtsvalue(gkey(n)), key))
462 return gval(n); /* that's it */ 462 return gval(n); /* that's it */
463 else n = gnext(n); 463 else n = gnext(n);
464 } while (n); 464 } while (n);
diff --git a/lvm.c b/lvm.c
index 1de3de03..fbc7c45a 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 2.146 2011/11/29 15:54:38 roberto Exp roberto $ 2** $Id: lvm.c,v 2.147 2011/12/07 14:43:55 roberto Exp roberto $
3** Lua virtual machine 3** Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -258,7 +258,7 @@ int luaV_equalobj_ (lua_State *L, const TValue *t1, const TValue *t2) {
258 case LUA_TBOOLEAN: return bvalue(t1) == bvalue(t2); /* true must be 1 !! */ 258 case LUA_TBOOLEAN: return bvalue(t1) == bvalue(t2); /* true must be 1 !! */
259 case LUA_TLIGHTUSERDATA: return pvalue(t1) == pvalue(t2); 259 case LUA_TLIGHTUSERDATA: return pvalue(t1) == pvalue(t2);
260 case LUA_TLCF: return fvalue(t1) == fvalue(t2); 260 case LUA_TLCF: return fvalue(t1) == fvalue(t2);
261 case LUA_TSTRING: return eqstr(rawtsvalue(t1), rawtsvalue(t2)); 261 case LUA_TSTRING: return luaS_eqstr(rawtsvalue(t1), rawtsvalue(t2));
262 case LUA_TUSERDATA: { 262 case LUA_TUSERDATA: {
263 if (uvalue(t1) == uvalue(t2)) return 1; 263 if (uvalue(t1) == uvalue(t2)) return 1;
264 else if (L == NULL) return 0; 264 else if (L == NULL) return 0;
@@ -293,7 +293,7 @@ void luaV_concat (lua_State *L, int total) {
293 else if (tsvalue(top-1)->len == 0) /* second operand is empty? */ 293 else if (tsvalue(top-1)->len == 0) /* second operand is empty? */
294 (void)tostring(L, top - 2); /* result is first operand */ 294 (void)tostring(L, top - 2); /* result is first operand */
295 else if (ttisstring(top-2) && tsvalue(top-2)->len == 0) { 295 else if (ttisstring(top-2) && tsvalue(top-2)->len == 0) {
296 setsvalue2s(L, top-2, rawtsvalue(top-1)); /* result is second op. */ 296 setobjs2s(L, top - 2, top - 1); /* result is second op. */
297 } 297 }
298 else { 298 else {
299 /* at least two non-empty string values; get as many as possible */ 299 /* at least two non-empty string values; get as many as possible */