diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-12-01 09:51:07 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-12-01 09:51:07 -0300 |
commit | efc7c5d503e30128e8282f0a70d3793e9ee3bd3a (patch) | |
tree | f7906ef6f523cec9666ca8c7c4967a2cf24f126d /lfunc.c | |
parent | d324a0ccf9e2511baf182dd981a8ee9835cee925 (diff) | |
parent | 9a77f57edc5cc24c2ab71d416b7481a5679e3869 (diff) | |
download | lua-efc7c5d503e30128e8282f0a70d3793e9ee3bd3a.tar.gz lua-efc7c5d503e30128e8282f0a70d3793e9ee3bd3a.tar.bz2 lua-efc7c5d503e30128e8282f0a70d3793e9ee3bd3a.zip |
Merge branch 'master' into nextversion
Diffstat (limited to 'lfunc.c')
-rw-r--r-- | lfunc.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -62,12 +62,11 @@ void luaF_initupvals (lua_State *L, LClosure *cl) { | |||
62 | ** Create a new upvalue at the given level, and link it to the list of | 62 | ** Create a new upvalue at the given level, and link it to the list of |
63 | ** open upvalues of 'L' after entry 'prev'. | 63 | ** open upvalues of 'L' after entry 'prev'. |
64 | **/ | 64 | **/ |
65 | static UpVal *newupval (lua_State *L, int tbc, StkId level, UpVal **prev) { | 65 | static UpVal *newupval (lua_State *L, StkId level, UpVal **prev) { |
66 | GCObject *o = luaC_newobj(L, LUA_VUPVAL, sizeof(UpVal)); | 66 | GCObject *o = luaC_newobj(L, LUA_VUPVAL, sizeof(UpVal)); |
67 | UpVal *uv = gco2upv(o); | 67 | UpVal *uv = gco2upv(o); |
68 | UpVal *next = *prev; | 68 | UpVal *next = *prev; |
69 | uv->v.p = s2v(level); /* current value lives in the stack */ | 69 | uv->v.p = s2v(level); /* current value lives in the stack */ |
70 | uv->tbc = tbc; | ||
71 | uv->u.open.next = next; /* link it to list of open upvalues */ | 70 | uv->u.open.next = next; /* link it to list of open upvalues */ |
72 | uv->u.open.previous = prev; | 71 | uv->u.open.previous = prev; |
73 | if (next) | 72 | if (next) |
@@ -96,7 +95,7 @@ UpVal *luaF_findupval (lua_State *L, StkId level) { | |||
96 | pp = &p->u.open.next; | 95 | pp = &p->u.open.next; |
97 | } | 96 | } |
98 | /* not found: create a new upvalue after 'pp' */ | 97 | /* not found: create a new upvalue after 'pp' */ |
99 | return newupval(L, 0, level, pp); | 98 | return newupval(L, level, pp); |
100 | } | 99 | } |
101 | 100 | ||
102 | 101 | ||