aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-01-08 12:06:55 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-01-08 12:06:55 -0200
commit0730a56d38241d70f49cc6fe650c4995fe7dcb2c (patch)
treedbd665c83f0cefc5dd162e2fe8bf2c290955472c
parenteecc1491f39947d575fea42ec99864d9625d6e87 (diff)
downloadlua-0730a56d38241d70f49cc6fe650c4995fe7dcb2c.tar.gz
lua-0730a56d38241d70f49cc6fe650c4995fe7dcb2c.tar.bz2
lua-0730a56d38241d70f49cc6fe650c4995fe7dcb2c.zip
detail
-rw-r--r--lstring.c4
-rw-r--r--lvm.h5
2 files changed, 4 insertions, 5 deletions
diff --git a/lstring.c b/lstring.c
index 86e3e0e5..48fd1414 100644
--- a/lstring.c
+++ b/lstring.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstring.c,v 2.24 2012/05/11 14:14:42 roberto Exp roberto $ 2** $Id: lstring.c,v 2.25 2012/10/02 17:41:50 roberto Exp roberto $
3** String table (keeps all strings handled by Lua) 3** String table (keeps all strings handled by Lua)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -139,7 +139,7 @@ static TString *internshrstr (lua_State *L, const char *str, size_t l) {
139 o = gch(o)->next) { 139 o = gch(o)->next) {
140 TString *ts = rawgco2ts(o); 140 TString *ts = rawgco2ts(o);
141 if (h == ts->tsv.hash && 141 if (h == ts->tsv.hash &&
142 ts->tsv.len == l && 142 l == ts->tsv.len &&
143 (memcmp(str, getstr(ts), l * sizeof(char)) == 0)) { 143 (memcmp(str, getstr(ts), l * sizeof(char)) == 0)) {
144 if (isdead(G(L), o)) /* string is dead (but was not collected yet)? */ 144 if (isdead(G(L), o)) /* string is dead (but was not collected yet)? */
145 changewhite(o); /* resurrect it */ 145 changewhite(o); /* resurrect it */
diff --git a/lvm.h b/lvm.h
index 258e2324..911f0e97 100644
--- a/lvm.h
+++ b/lvm.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.h,v 2.16 2011/05/31 18:24:36 roberto Exp roberto $ 2** $Id: lvm.h,v 2.17 2011/05/31 18:27:56 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*/
@@ -19,8 +19,7 @@
19 19
20#define equalobj(L,o1,o2) (ttisequal(o1, o2) && luaV_equalobj_(L, o1, o2)) 20#define equalobj(L,o1,o2) (ttisequal(o1, o2) && luaV_equalobj_(L, o1, o2))
21 21
22#define luaV_rawequalobj(t1,t2) \ 22#define luaV_rawequalobj(o1,o2) equalobj(NULL,o1,o2)
23 (ttisequal(t1,t2) && luaV_equalobj_(NULL,t1,t2))
24 23
25 24
26/* not to called directly */ 25/* not to called directly */