diff options
| author | Lua Team <team@lua.org> | 2013-11-11 12:00:00 +0000 |
|---|---|---|
| committer | repogen <> | 2013-11-11 12:00:00 +0000 |
| commit | 357e7cdc32cd4224b03748e4f284857e47f70a68 (patch) | |
| tree | 43dd992e668609554251ce6b69df4c29d560835e /src/llex.c | |
| parent | dc27609467d2699ac9252e89d632432ac5f798f2 (diff) | |
| download | lua-github-5.2.3.tar.gz | |
Diffstat (limited to 'src/llex.c')
| -rw-r--r-- | src/llex.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; } |
