aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cancel.cpp2
-rw-r--r--src/lane.cpp8
-rw-r--r--src/lane.h2
-rw-r--r--src/tracker.cpp2
4 files changed, 7 insertions, 7 deletions
diff --git a/src/cancel.cpp b/src/cancel.cpp
index a62fa96..990f5d4 100644
--- a/src/cancel.cpp
+++ b/src/cancel.cpp
@@ -186,7 +186,7 @@ LUAG_FUNC(thread_cancel)
186 186
187 case CancelResult::Cancelled: 187 case CancelResult::Cancelled:
188 lua_pushboolean(L_, 1); // true 188 lua_pushboolean(L_, 1); // true
189 std::ignore = _lane->pushThreadStatus(L_); // true "<status>" 189 _lane->pushStatusString(L_); // true "<status>"
190 break; 190 break;
191 } 191 }
192 STACK_CHECK(L_, 2); 192 STACK_CHECK(L_, 2);
diff --git a/src/lane.cpp b/src/lane.cpp
index a998e9c..e801cba 100644
--- a/src/lane.cpp
+++ b/src/lane.cpp
@@ -228,7 +228,7 @@ static int thread_index_number(lua_State* L_)
228 // this is an internal error, we probably never get here 228 // this is an internal error, we probably never get here
229 lua_settop(L_, 0); // L_: 229 lua_settop(L_, 0); // L_:
230 luaG_pushstring(L_, "Unexpected status: "); // L_: "Unexpected status: " 230 luaG_pushstring(L_, "Unexpected status: "); // L_: "Unexpected status: "
231 std::ignore = _lane->pushThreadStatus(L_); // L_: "Unexpected status: " "<status>" 231 _lane->pushStatusString(L_); // L_: "Unexpected status: " "<status>"
232 lua_concat(L_, 2); // L_: "Unexpected status: <status>" 232 lua_concat(L_, 2); // L_: "Unexpected status: <status>"
233 raise_lua_error(L_); 233 raise_lua_error(L_);
234 234
@@ -315,7 +315,7 @@ static int thread_index_string(lua_State* L_)
315 std::string_view const _keystr{ luaG_tostring(L_, kKey) }; 315 std::string_view const _keystr{ luaG_tostring(L_, kKey) };
316 lua_settop(L_, 2); // keep only our original arguments on the stack 316 lua_settop(L_, 2); // keep only our original arguments on the stack
317 if (_keystr == "status") { 317 if (_keystr == "status") {
318 std::ignore = _lane->pushThreadStatus(L_); // L_: lane "key" "<status>" 318 _lane->pushStatusString(L_); // L_: lane "key" "<status>"
319 return 1; 319 return 1;
320 } 320 }
321 if (_keystr == "error_trace_level") { 321 if (_keystr == "error_trace_level") {
@@ -1008,12 +1008,12 @@ void Lane::PushMetatable(lua_State* L_)
1008 1008
1009// ################################################################################################# 1009// #################################################################################################
1010 1010
1011[[nodiscard]] std::string_view Lane::pushThreadStatus(lua_State* L_) const 1011void Lane::pushStatusString(lua_State* L_) const
1012{ 1012{
1013 std::string_view const _str{ threadStatusString() }; 1013 std::string_view const _str{ threadStatusString() };
1014 LUA_ASSERT(L_, !_str.empty()); 1014 LUA_ASSERT(L_, !_str.empty());
1015 1015
1016 return luaG_pushstring(L_, _str); 1016 luaG_pushstring(L_, _str);
1017} 1017}
1018 1018
1019// ################################################################################################# 1019// #################################################################################################
diff --git a/src/lane.h b/src/lane.h
index 704a760..4461b37 100644
--- a/src/lane.h
+++ b/src/lane.h
@@ -138,7 +138,7 @@ class Lane
138 [[nodiscard]] int pushErrorHandler() const; 138 [[nodiscard]] int pushErrorHandler() const;
139 [[nodiscard]] std::string_view pushErrorTraceLevel(lua_State* L_) const; 139 [[nodiscard]] std::string_view pushErrorTraceLevel(lua_State* L_) const;
140 static void PushMetatable(lua_State* L_); 140 static void PushMetatable(lua_State* L_);
141 [[nodiscard]] std::string_view pushThreadStatus(lua_State* L_) const; 141 void pushStatusString(lua_State* L_) const;
142 void securizeDebugName(lua_State* L_); 142 void securizeDebugName(lua_State* L_);
143 void startThread(int priority_); 143 void startThread(int priority_);
144 [[nodiscard]] std::string_view threadStatusString() const; 144 [[nodiscard]] std::string_view threadStatusString() const;
diff --git a/src/tracker.cpp b/src/tracker.cpp
index 315b56b..05902c9 100644
--- a/src/tracker.cpp
+++ b/src/tracker.cpp
@@ -96,7 +96,7 @@ void LaneTracker::tracking_add(Lane* lane_)
96 lua_createtable(L_, 0, 2); // L_: {} {} 96 lua_createtable(L_, 0, 2); // L_: {} {}
97 luaG_pushstring(L_, _lane->debugName); // L_: {} {} "name" 97 luaG_pushstring(L_, _lane->debugName); // L_: {} {} "name"
98 lua_setfield(L_, -2, "name"); // L_: {} {} 98 lua_setfield(L_, -2, "name"); // L_: {} {}
99 std::ignore = _lane->pushThreadStatus(L_); // L_: {} {} "status" 99 _lane->pushStatusString(L_); // L_: {} {} "<status>"
100 lua_setfield(L_, -2, "status"); // L_: {} {} 100 lua_setfield(L_, -2, "status"); // L_: {} {}
101 lua_rawseti(L_, -2, ++_index); // L_: {} 101 lua_rawseti(L_, -2, ++_index); // L_: {}
102 _lane = _lane->tracking_next; 102 _lane = _lane->tracking_next;