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 974b5643..24ae6611 100644 --- a/src/lj_api.c +++ b/src/lj_api.c | |||
@@ -892,7 +892,8 @@ LUA_API int lua_next(lua_State *L, int idx) | |||
892 | LUA_API const char *lua_getupvalue(lua_State *L, int idx, int n) | 892 | LUA_API const char *lua_getupvalue(lua_State *L, int idx, int n) |
893 | { | 893 | { |
894 | TValue *val; | 894 | TValue *val; |
895 | const char *name = lj_debug_uvnamev(index2adr(L, idx), (uint32_t)(n-1), &val); | 895 | GCobj *o; |
896 | const char *name = lj_debug_uvnamev(index2adr(L, idx), (uint32_t)(n-1), &val, &o); | ||
896 | if (name) { | 897 | if (name) { |
897 | copyTV(L, L->top, val); | 898 | copyTV(L, L->top, val); |
898 | incr_top(L); | 899 | incr_top(L); |
@@ -1078,13 +1079,14 @@ LUA_API const char *lua_setupvalue(lua_State *L, int idx, int n) | |||
1078 | { | 1079 | { |
1079 | cTValue *f = index2adr(L, idx); | 1080 | cTValue *f = index2adr(L, idx); |
1080 | TValue *val; | 1081 | TValue *val; |
1082 | GCobj *o; | ||
1081 | const char *name; | 1083 | const char *name; |
1082 | api_checknelems(L, 1); | 1084 | api_checknelems(L, 1); |
1083 | name = lj_debug_uvnamev(f, (uint32_t)(n-1), &val); | 1085 | name = lj_debug_uvnamev(f, (uint32_t)(n-1), &val, &o); |
1084 | if (name) { | 1086 | if (name) { |
1085 | L->top--; | 1087 | L->top--; |
1086 | copyTV(L, val, L->top); | 1088 | copyTV(L, val, L->top); |
1087 | lj_gc_barrier(L, funcV(f), L->top); | 1089 | lj_gc_barrier(L, o, L->top); |
1088 | } | 1090 | } |
1089 | return name; | 1091 | return name; |
1090 | } | 1092 | } |