diff options
Diffstat (limited to 'src/lanes.cpp')
-rw-r--r-- | src/lanes.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lanes.cpp b/src/lanes.cpp index df509ee..72652ef 100644 --- a/src/lanes.cpp +++ b/src/lanes.cpp | |||
@@ -572,7 +572,7 @@ static int selfdestruct_gc( lua_State* L) | |||
572 | // no need to mutex-protect this as all threads in the universe are gone at that point | 572 | // no need to mutex-protect this as all threads in the universe are gone at that point |
573 | if( U->timer_deep != nullptr) // test ins case some early internal error prevented Lanes from creating the deep timer | 573 | if( U->timer_deep != nullptr) // test ins case some early internal error prevented Lanes from creating the deep timer |
574 | { | 574 | { |
575 | int const prev_ref_count{ U->timer_deep->m_refcount.fetch_sub(1, std::memory_order_relaxed) }; | 575 | [[maybe_unused]] int const prev_ref_count{ U->timer_deep->m_refcount.fetch_sub(1, std::memory_order_relaxed) }; |
576 | ASSERT_L(prev_ref_count == 1); // this should be the last reference | 576 | ASSERT_L(prev_ref_count == 1); // this should be the last reference |
577 | free_deep_prelude(L, U->timer_deep); | 577 | free_deep_prelude(L, U->timer_deep); |
578 | U->timer_deep = nullptr; | 578 | U->timer_deep = nullptr; |
@@ -1212,7 +1212,7 @@ LUAG_FUNC( lane_new) | |||
1212 | // 's' is allocated from heap, not Lua, since its life span may surpass the handle's (if free running thread) | 1212 | // 's' is allocated from heap, not Lua, since its life span may surpass the handle's (if free running thread) |
1213 | // | 1213 | // |
1214 | // a Lane full userdata needs a single uservalue | 1214 | // a Lane full userdata needs a single uservalue |
1215 | Lane** const ud{ static_cast<Lane**>(lua_newuserdatauv(L, sizeof(Lane*), 1)) }; // func libs priority globals package required gc_cb lane | 1215 | Lane** const ud{ lua_newuserdatauv<Lane*>(L, 1) }; // func libs priority globals package required gc_cb lane |
1216 | Lane* const s{ *ud = static_cast<Lane*>(U->internal_allocator.alloc(sizeof(Lane))) }; // don't forget to store the pointer in the userdata! | 1216 | Lane* const s{ *ud = static_cast<Lane*>(U->internal_allocator.alloc(sizeof(Lane))) }; // don't forget to store the pointer in the userdata! |
1217 | if( s == nullptr) | 1217 | if( s == nullptr) |
1218 | { | 1218 | { |
@@ -1915,8 +1915,7 @@ LUAG_FUNC( configure) | |||
1915 | STACK_CHECK( L, 2); | 1915 | STACK_CHECK( L, 2); |
1916 | 1916 | ||
1917 | { | 1917 | { |
1918 | char const* errmsg; | 1918 | char const* errmsg{ push_deep_proxy(L, U->timer_deep, 0, eLM_LaneBody) }; // settings M timer_deep |
1919 | errmsg = push_deep_proxy(L, U->timer_deep, 0, eLM_LaneBody); // settings M timer_deep | ||
1920 | if( errmsg != nullptr) | 1919 | if( errmsg != nullptr) |
1921 | { | 1920 | { |
1922 | return luaL_error( L, errmsg); | 1921 | return luaL_error( L, errmsg); |