From efd5318b2d9132996bf35a6af2e82706665890ff Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Mon, 16 Dec 2024 09:50:52 +0100 Subject: Unit tests for thread name --- src/lane.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/lane.cpp b/src/lane.cpp index 63efdb6..7664dd6 100644 --- a/src/lane.cpp +++ b/src/lane.cpp @@ -88,12 +88,12 @@ static LUAG_FUNC(lane_threadname) Lane* const _lane{ luaG_tolightuserdata(L_, StackIndex{ lua_upvalueindex(1) }) }; LUA_ASSERT(L_, L_ == _lane->L); // this function is exported in a lane's state, therefore it is callable only from inside the Lane's state if (lua_gettop(L_) == 1) { - lua_settop(L_, 1); - STACK_CHECK_START_REL(L_, 0); - _lane->storeDebugName(luaG_tostring(L_, kIdxTop)); - _lane->applyDebugName(); - STACK_CHECK(L_, 0); - return 0; + lua_settop(L_, 1); + STACK_CHECK_START_REL(L_, 0); + _lane->storeDebugName(luaG_tostring(L_, kIdxTop)); + _lane->applyDebugName(); + STACK_CHECK(L_, 0); + return 0; } else if (lua_gettop(L_) == 0) { luaG_pushstring(L_, _lane->getDebugName()); return 1; -- cgit v1.2.3-55-g6feb