| 1500 | |
| 1501 | |
| 1502 | LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n) { |
| 1503 | const char *name; |
| 1504 | TValue *val = NULL; /* to avoid warnings */ |
| 1505 | lua_lock(L); |
| 1506 | name = aux_upvalue(index2value(L, funcindex), n, &val, NULL); |
| 1507 | if (name) { |
| 1508 | setobj2s(L, L->top.p, val); |
| 1509 | api_incr_top(L); |
| 1510 | } |
| 1511 | lua_unlock(L); |
| 1512 | return name; |
| 1513 | } |
| 1514 | |
| 1515 | |
| 1516 | LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n) { |
no test coverage detected