aboutsummaryrefslogtreecommitdiff
path: root/src/lane.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lane.cpp')
-rw-r--r--src/lane.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lane.cpp b/src/lane.cpp
index 129c926..f4d4bd1 100644
--- a/src/lane.cpp
+++ b/src/lane.cpp
@@ -278,7 +278,7 @@ static int thread_index_number(lua_State* L_)
278 lua_replace(L_, -3); // L_: lane n error() "error" 278 lua_replace(L_, -3); // L_: lane n error() "error"
279 lua_pushinteger(L_, 3); // L_: lane n error() "error" 3 279 lua_pushinteger(L_, 3); // L_: lane n error() "error" 3
280 lua_call(L_, 2, 0); // error(tostring(errstring), 3) -> doesn't return // L_: lane n 280 lua_call(L_, 2, 0); // error(tostring(errstring), 3) -> doesn't return // L_: lane n
281 raise_luaL_error(L_, STRINGVIEW_FMT ": should not get here!", _lane->debugName.size(), _lane->debugName.data()); 281 raise_luaL_error(L_, "%s: should not get here!", _lane->debugName.data());
282 } else { 282 } else {
283 lua_pop(L_, 1); // L_: lane n {uv} 283 lua_pop(L_, 1); // L_: lane n {uv}
284 } 284 }
@@ -316,7 +316,7 @@ static int thread_index_string(lua_State* L_)
316 lua_rawget(L_, -2); // L_: mt value 316 lua_rawget(L_, -2); // L_: mt value
317 // only "cancel" and "join" are registered as functions, any other string will raise an error 317 // only "cancel" and "join" are registered as functions, any other string will raise an error
318 if (!lua_iscfunction(L_, -1)) { 318 if (!lua_iscfunction(L_, -1)) {
319 raise_luaL_error(L_, "can't index a lane with '" STRINGVIEW_FMT "'", _keystr.size(), _keystr.data()); 319 raise_luaL_error(L_, "can't index a lane with '%s'", _keystr.data());
320 } 320 }
321 return 1; 321 return 1;
322} 322}
@@ -345,7 +345,7 @@ static LUAG_FUNC(thread_index)
345 lua_pushvalue(L_, kKey); // L_: mt error "Unknown key: " k 345 lua_pushvalue(L_, kKey); // L_: mt error "Unknown key: " k
346 lua_concat(L_, 2); // L_: mt error "Unknown key: <k>" 346 lua_concat(L_, 2); // L_: mt error "Unknown key: <k>"
347 lua_call(L_, 1, 0); // error( "Unknown key: " .. key) -> doesn't return // L_: mt 347 lua_call(L_, 1, 0); // error( "Unknown key: " .. key) -> doesn't return // L_: mt
348 raise_luaL_error(L_, STRINGVIEW_FMT "[%s]: should not get here!", _lane->debugName.size(), _lane->debugName.data(), lua_typename(L_, lua_type(L_, kKey))); 348 raise_luaL_error(L_, "%s[%s]: should not get here!", _lane->debugName.data(), lua_typename(L_, lua_type(L_, kKey)));
349 } 349 }
350} 350}
351 351