| 194 | |
| 195 | |
| 196 | LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n) { |
| 197 | StkId pos = NULL; /* to avoid warnings */ |
| 198 | const char *name; |
| 199 | lua_lock(L); |
| 200 | swapextra(L); |
| 201 | name = findlocal(L, ar->i_ci, n, &pos); |
| 202 | if (name) { |
| 203 | setobjs2s(L, pos, L->top - 1); |
| 204 | L->top--; /* pop value */ |
| 205 | } |
| 206 | swapextra(L); |
| 207 | lua_unlock(L); |
| 208 | return name; |
| 209 | } |
| 210 | |
| 211 | |
| 212 | static void funcinfo (lua_Debug *ar, Closure *cl) { |
no test coverage detected