| 216 | |
| 217 | |
| 218 | LUA_API const char *lua_setlocal(lua_State *L, const lua_Debug *ar, int n) { |
| 219 | StkId pos = nullptr; /* to avoid warnings */ |
| 220 | const char *name; |
| 221 | lua_lock(L); |
| 222 | swapextra(L); |
| 223 | name = findlocal(L, ar->i_ci, n, &pos); |
| 224 | if (name) { |
| 225 | setobjs2s(L, pos, L->top - 1); |
| 226 | L->top--; /* pop value */ |
| 227 | } |
| 228 | swapextra(L); |
| 229 | lua_unlock(L); |
| 230 | return name; |
| 231 | } |
| 232 | |
| 233 | |
| 234 | static void funcinfo(lua_Debug *ar, Closure *cl) { |
no test coverage detected