aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-12-16 09:50:52 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2024-12-16 09:50:52 +0100
commitefd5318b2d9132996bf35a6af2e82706665890ff (patch)
treed92946126d43258b86a67c655353dba22f8982e0 /src
parent0740a54fe0f4d4264875ae1dc3334e33e27f4ff9 (diff)
downloadlanes-efd5318b2d9132996bf35a6af2e82706665890ff.tar.gz
lanes-efd5318b2d9132996bf35a6af2e82706665890ff.tar.bz2
lanes-efd5318b2d9132996bf35a6af2e82706665890ff.zip
Unit tests for thread name
Diffstat (limited to 'src')
-rw-r--r--src/lane.cpp12
1 files changed, 6 insertions, 6 deletions
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)
88 Lane* const _lane{ luaG_tolightuserdata<Lane>(L_, StackIndex{ lua_upvalueindex(1) }) }; 88 Lane* const _lane{ luaG_tolightuserdata<Lane>(L_, StackIndex{ lua_upvalueindex(1) }) };
89 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 89 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
90 if (lua_gettop(L_) == 1) { 90 if (lua_gettop(L_) == 1) {
91 lua_settop(L_, 1); 91 lua_settop(L_, 1);
92 STACK_CHECK_START_REL(L_, 0); 92 STACK_CHECK_START_REL(L_, 0);
93 _lane->storeDebugName(luaG_tostring(L_, kIdxTop)); 93 _lane->storeDebugName(luaG_tostring(L_, kIdxTop));
94 _lane->applyDebugName(); 94 _lane->applyDebugName();
95 STACK_CHECK(L_, 0); 95 STACK_CHECK(L_, 0);
96 return 0; 96 return 0;
97 } else if (lua_gettop(L_) == 0) { 97 } else if (lua_gettop(L_) == 0) {
98 luaG_pushstring(L_, _lane->getDebugName()); 98 luaG_pushstring(L_, _lane->getDebugName());
99 return 1; 99 return 1;