aboutsummaryrefslogtreecommitdiff
path: root/src/lanes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lanes.cpp')
-rw-r--r--src/lanes.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lanes.cpp b/src/lanes.cpp
index 1f795cc..d9262cf 100644
--- a/src/lanes.cpp
+++ b/src/lanes.cpp
@@ -544,14 +544,12 @@ static void selfdestruct_add(Lane* lane_)
544 } 544 }
545 } 545 }
546 546
547 // necessary so that calling free_deep_prelude doesn't crash because linda_id expects a linda lightuserdata at absolute slot 1
548 lua_settop(L, 0);
549 // no need to mutex-protect this as all threads in the universe are gone at that point 547 // no need to mutex-protect this as all threads in the universe are gone at that point
550 if (U->timer_deep != nullptr) // test ins case some early internal error prevented Lanes from creating the deep timer 548 if (U->timer_deep != nullptr) // test ins case some early internal error prevented Lanes from creating the deep timer
551 { 549 {
552 [[maybe_unused]] int const prev_ref_count{ U->timer_deep->m_refcount.fetch_sub(1, std::memory_order_relaxed) }; 550 [[maybe_unused]] int const prev_ref_count{ U->timer_deep->m_refcount.fetch_sub(1, std::memory_order_relaxed) };
553 ASSERT_L(prev_ref_count == 1); // this should be the last reference 551 ASSERT_L(prev_ref_count == 1); // this should be the last reference
554 free_deep_prelude(L, U->timer_deep); 552 DeepFactory::DeleteDeepObject(L, U->timer_deep);
555 U->timer_deep = nullptr; 553 U->timer_deep = nullptr;
556 } 554 }
557 555
@@ -1840,7 +1838,7 @@ LUAG_FUNC(configure)
1840 STACK_CHECK(L, 2); 1838 STACK_CHECK(L, 2);
1841 1839
1842 { 1840 {
1843 char const* errmsg{ push_deep_proxy(Dest{ L }, U->timer_deep, 0, LookupMode::LaneBody) }; // settings M timer_deep 1841 char const* errmsg{ DeepFactory::PushDeepProxy(Dest{ L }, U->timer_deep, 0, LookupMode::LaneBody) }; // settings M timer_deep
1844 if (errmsg != nullptr) 1842 if (errmsg != nullptr)
1845 { 1843 {
1846 return luaL_error(L, errmsg); 1844 return luaL_error(L, errmsg);