diff options
Diffstat (limited to 'src/lj_api.c')
-rw-r--r-- | src/lj_api.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lj_api.c b/src/lj_api.c index e2d7e533..1a34a774 100644 --- a/src/lj_api.c +++ b/src/lj_api.c | |||
@@ -841,7 +841,8 @@ LUA_API int lua_next(lua_State *L, int idx) | |||
841 | LUA_API const char *lua_getupvalue(lua_State *L, int idx, int n) | 841 | LUA_API const char *lua_getupvalue(lua_State *L, int idx, int n) |
842 | { | 842 | { |
843 | TValue *val; | 843 | TValue *val; |
844 | const char *name = lj_debug_uvnamev(index2adr(L, idx), (uint32_t)(n-1), &val); | 844 | GCobj *o; |
845 | const char *name = lj_debug_uvnamev(index2adr(L, idx), (uint32_t)(n-1), &val, &o); | ||
845 | if (name) { | 846 | if (name) { |
846 | copyTV(L, L->top, val); | 847 | copyTV(L, L->top, val); |
847 | incr_top(L); | 848 | incr_top(L); |
@@ -1014,13 +1015,14 @@ LUA_API const char *lua_setupvalue(lua_State *L, int idx, int n) | |||
1014 | { | 1015 | { |
1015 | cTValue *f = index2adr(L, idx); | 1016 | cTValue *f = index2adr(L, idx); |
1016 | TValue *val; | 1017 | TValue *val; |
1018 | GCobj *o; | ||
1017 | const char *name; | 1019 | const char *name; |
1018 | api_checknelems(L, 1); | 1020 | api_checknelems(L, 1); |
1019 | name = lj_debug_uvnamev(f, (uint32_t)(n-1), &val); | 1021 | name = lj_debug_uvnamev(f, (uint32_t)(n-1), &val, &o); |
1020 | if (name) { | 1022 | if (name) { |
1021 | L->top--; | 1023 | L->top--; |
1022 | copyTV(L, val, L->top); | 1024 | copyTV(L, val, L->top); |
1023 | lj_gc_barrier(L, funcV(f), L->top); | 1025 | lj_gc_barrier(L, o, L->top); |
1024 | } | 1026 | } |
1025 | return name; | 1027 | return name; |
1026 | } | 1028 | } |