no more 'luaH_setstr (used only once) + 'luaH_setint' receives value

to be set.
This commit is contained in:
Roberto Ierusalimschy
2011-08-09 17:58:29 -03:00
parent b5bf7d9ef4
commit 92afcf2823
7 changed files with 25 additions and 34 deletions

4
llex.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: llex.c,v 2.54 2011/07/15 12:30:41 roberto Exp roberto $
** $Id: llex.c,v 2.55 2011/07/15 12:48:03 roberto Exp roberto $
** Lexical Analyzer
** See Copyright Notice in lua.h
*/
@@ -126,7 +126,7 @@ TString *luaX_newstring (LexState *ls, const char *str, size_t l) {
TValue *o; /* entry for `str' */
TString *ts = luaS_newlstr(L, str, l); /* create new string */
setsvalue2s(L, L->top++, ts); /* temporarily anchor it in stack */
o = luaH_setstr(L, ls->fs->h, ts);
o = luaH_set(L, ls->fs->h, L->top - 1);
if (ttisnil(o)) {
setbvalue(o, 1); /* t[string] = true */
luaC_checkGC(L);