summaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2022-10-29 12:06:37 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2022-10-29 12:06:37 -0300
commit413a393e6222482f46599e138bebac162610a572 (patch)
tree181517f8ec8d56f9101de33f4891729044f244de /llex.c
parentba089bcb08a0efc6c26fb5c1e3c9d61c00cc012c (diff)
downloadlua-github-413a393e6222482f46599e138bebac162610a572.tar.gz
Stack indices changed to union's
That will allow to change pointers to offsets while reallocating the stack.
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 e9915178..b0dc0acc 100644
--- a/llex.c
+++ b/llex.c
@@ -138,12 +138,12 @@ TString *luaX_newstring (LexState *ls, const char *str, size_t l) {
if (!ttisnil(o)) /* string already present? */
ts = keystrval(nodefromval(o)); /* get saved copy */
else { /* not in use yet */
- TValue *stv = s2v(L->top++); /* reserve stack space for string */
+ TValue *stv = s2v(L->top.p++); /* reserve stack space for string */
setsvalue(L, stv, ts); /* temporarily anchor the string */
luaH_finishset(L, ls->h, stv, o, stv); /* t[string] = string */
/* table is not a metatable, so it does not need to invalidate cache */
luaC_checkGC(L);
- L->top--; /* remove string from stack */
+ L->top.p--; /* remove string from stack */
}
return ts;
}