| 1268 | |
| 1269 | |
| 1270 | LUA_API void lua_toclose (lua_State *L, int idx) { |
| 1271 | int nresults; |
| 1272 | StkId o; |
| 1273 | lua_lock(L); |
| 1274 | o = index2stack(L, idx); |
| 1275 | nresults = L->ci->nresults; |
| 1276 | api_check(L, L->tbclist.p < o, "given index below or equal a marked one"); |
| 1277 | luaF_newtbcupval(L, o); /* create new to-be-closed upvalue */ |
| 1278 | if (!hastocloseCfunc(nresults)) /* function not marked yet? */ |
| 1279 | L->ci->nresults = codeNresults(nresults); /* mark it */ |
| 1280 | lua_assert(hastocloseCfunc(L->ci->nresults)); |
| 1281 | lua_unlock(L); |
| 1282 | } |
| 1283 | |
| 1284 | |
| 1285 | LUA_API void lua_concat (lua_State *L, int n) { |
no test coverage detected