aboutsummaryrefslogtreecommitdiff
path: root/src/cancel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cancel.cpp')
-rw-r--r--src/cancel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cancel.cpp b/src/cancel.cpp
index 9248b25..8fa68d5 100644
--- a/src/cancel.cpp
+++ b/src/cancel.cpp
@@ -50,7 +50,8 @@ THE SOFTWARE.
50 * Returns CANCEL_SOFT/HARD if any locks are to be exited, and 'raise_cancel_error()' called, 50 * Returns CANCEL_SOFT/HARD if any locks are to be exited, and 'raise_cancel_error()' called,
51 * to make execution of the lane end. 51 * to make execution of the lane end.
52 */ 52 */
53[[nodiscard]] CancelRequest CheckCancelRequest(lua_State* const L_) 53[[nodiscard]]
54CancelRequest CheckCancelRequest(lua_State* const L_)
54{ 55{
55 auto const* const _lane{ kLanePointerRegKey.readLightUserDataValue<Lane>(L_) }; 56 auto const* const _lane{ kLanePointerRegKey.readLightUserDataValue<Lane>(L_) };
56 // 'lane' is nullptr for the original main state (and no-one can cancel that) 57 // 'lane' is nullptr for the original main state (and no-one can cancel that)
@@ -103,7 +104,8 @@ CancelOp WhichCancelOp(std::string_view const& opString_)
103 104
104// ################################################################################################# 105// #################################################################################################
105 106
106[[nodiscard]] static CancelOp WhichCancelOp(lua_State* const L_, StackIndex const idx_) 107[[nodiscard]]
108static CancelOp WhichCancelOp(lua_State* const L_, StackIndex const idx_)
107{ 109{
108 if (luaG_type(L_, idx_) == LuaType::STRING) { 110 if (luaG_type(L_, idx_) == LuaType::STRING) {
109 std::string_view const _str{ luaG_tostring(L_, idx_) }; 111 std::string_view const _str{ luaG_tostring(L_, idx_) };