aboutsummaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-06-29 12:06:44 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-06-29 12:06:44 -0300
commitf96497397addca22f22a6ba6eeabc906be43f16b (patch)
treeaf8d27b9af36dfe0b0b6e0f765ea90b95b110efc /llex.c
parent5a1c8d8ef343bf0157851a4832c2c937b812b64f (diff)
downloadlua-f96497397addca22f22a6ba6eeabc906be43f16b.tar.gz
lua-f96497397addca22f22a6ba6eeabc906be43f16b.tar.bz2
lua-f96497397addca22f22a6ba6eeabc906be43f16b.zip
new type 'StackValue' for stack elements
(we may want to put extra info there in the future)
Diffstat (limited to 'llex.c')
-rw-r--r--llex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/llex.c b/llex.c
index d840a3ca..eaa400fa 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 2.96 2016/05/02 14:02:12 roberto Exp roberto $ 2** $Id: llex.c,v 2.97 2017/06/09 16:48:44 roberto Exp roberto $
3** Lexical Analyzer 3** Lexical Analyzer
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -129,7 +129,7 @@ TString *luaX_newstring (LexState *ls, const char *str, size_t l) {
129 TValue *o; /* entry for 'str' */ 129 TValue *o; /* entry for 'str' */
130 TString *ts = luaS_newlstr(L, str, l); /* create new string */ 130 TString *ts = luaS_newlstr(L, str, l); /* create new string */
131 setsvalue2s(L, L->top++, ts); /* temporarily anchor it in stack */ 131 setsvalue2s(L, L->top++, ts); /* temporarily anchor it in stack */
132 o = luaH_set(L, ls->h, L->top - 1); 132 o = luaH_set(L, ls->h, s2v(L->top - 1));
133 if (ttisnil(o)) { /* not in use yet? */ 133 if (ttisnil(o)) { /* not in use yet? */
134 /* boolean value does not need GC barrier; 134 /* boolean value does not need GC barrier;
135 table is not a metatable, so it does not need to invalidate cache */ 135 table is not a metatable, so it does not need to invalidate cache */