summaryrefslogtreecommitdiff
path: root/src/llex.c
diff options
context:
space:
mode:
authorLua Team <team@lua.org>2013-11-11 12:00:00 +0000
committerrepogen <>2013-11-11 12:00:00 +0000
commit357e7cdc32cd4224b03748e4f284857e47f70a68 (patch)
tree43dd992e668609554251ce6b69df4c29d560835e /src/llex.c
parentdc27609467d2699ac9252e89d632432ac5f798f2 (diff)
downloadlua-github-5.2.3.tar.gz
Diffstat (limited to 'src/llex.c')
-rw-r--r--src/llex.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/llex.c b/src/llex.c
index 1a32e348..c4b820e8 100644
--- a/src/llex.c
+++ b/src/llex.c
@@ -1,5 +1,5 @@
/*
-** $Id: llex.c,v 2.63 2013/03/16 21:10:18 roberto Exp $
+** $Id: llex.c,v 2.63.1.2 2013/08/30 15:49:41 roberto Exp $
** Lexical Analyzer
** See Copyright Notice in lua.h
*/
@@ -133,6 +133,9 @@ TString *luaX_newstring (LexState *ls, const char *str, size_t l) {
setbvalue(o, 1); /* t[string] = true */
luaC_checkGC(L);
}
+ else { /* string already present */
+ ts = rawtsvalue(keyfromval(o)); /* re-use value previously stored */
+ }
L->top--; /* remove string from stack */
return ts;
}