| 1454 | |
| 1455 | |
| 1456 | LUA_API void lua_upvaluejoin (lua_State *L, int fidx1, int n1, |
| 1457 | int fidx2, int n2) { |
| 1458 | LClosure *f1; |
| 1459 | UpVal **up1 = getupvalref(L, fidx1, n1, &f1); |
| 1460 | UpVal **up2 = getupvalref(L, fidx2, n2, NULL); |
| 1461 | api_check(L, *up1 != NULL && *up2 != NULL, "invalid upvalue index"); |
| 1462 | *up1 = *up2; |
| 1463 | luaC_objbarrier(L, f1, *up1); |
| 1464 | } |
| 1465 | |
| 1466 |
no test coverage detected