summaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-08-09 17:58:29 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-08-09 17:58:29 -0300
commit92afcf2823e5dfbe9bb10b0ed62306b6015fcfb8 (patch)
tree8e360f9491a5d547a8be1aaddce780adb9fcea6b /llex.c
parentb5bf7d9ef414ce05da8523b966d94252c32a4010 (diff)
downloadlua-92afcf2823e5dfbe9bb10b0ed62306b6015fcfb8.tar.gz
lua-92afcf2823e5dfbe9bb10b0ed62306b6015fcfb8.tar.bz2
lua-92afcf2823e5dfbe9bb10b0ed62306b6015fcfb8.zip
no more 'luaH_setstr (used only once) + 'luaH_setint' receives value
to be set.
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 5b07da4b..cc56ce8c 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 2.54 2011/07/15 12:30:41 roberto Exp roberto $ 2** $Id: llex.c,v 2.55 2011/07/15 12:48:03 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*/
@@ -126,7 +126,7 @@ TString *luaX_newstring (LexState *ls, const char *str, size_t l) {
126 TValue *o; /* entry for `str' */ 126 TValue *o; /* entry for `str' */
127 TString *ts = luaS_newlstr(L, str, l); /* create new string */ 127 TString *ts = luaS_newlstr(L, str, l); /* create new string */
128 setsvalue2s(L, L->top++, ts); /* temporarily anchor it in stack */ 128 setsvalue2s(L, L->top++, ts); /* temporarily anchor it in stack */
129 o = luaH_setstr(L, ls->fs->h, ts); 129 o = luaH_set(L, ls->fs->h, L->top - 1);
130 if (ttisnil(o)) { 130 if (ttisnil(o)) {
131 setbvalue(o, 1); /* t[string] = true */ 131 setbvalue(o, 1); /* t[string] = true */
132 luaC_checkGC(L); 132 luaC_checkGC(L);