aboutsummaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
Diffstat (limited to 'llex.c')
-rw-r--r--llex.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/llex.c b/llex.c
index 4d1146ce..1f09f265 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 2.32 2009/03/11 13:27:32 roberto Exp roberto $ 2** $Id: llex.c,v 2.33 2009/05/18 17:28:04 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*/
@@ -123,8 +123,10 @@ TString *luaX_newstring (LexState *ls, const char *str, size_t l) {
123 TString *ts = luaS_newlstr(L, str, l); 123 TString *ts = luaS_newlstr(L, str, l);
124 setsvalue2s(L, L->top++, ts); /* anchor string */ 124 setsvalue2s(L, L->top++, ts); /* anchor string */
125 o = luaH_setstr(L, ls->fs->h, ts); 125 o = luaH_setstr(L, ls->fs->h, ts);
126 if (ttisnil(o)) 126 if (ttisnil(o)) {
127 setbvalue(o, 1); /* make sure `str' will not be collected */ 127 setbvalue(o, 1); /* make sure `str' will not be collected */
128 luaC_checkGC(L);
129 }
128 L->top--; 130 L->top--;
129 return ts; 131 return ts;
130} 132}