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