diff options
Diffstat (limited to 'src/lanes.cpp')
-rw-r--r-- | src/lanes.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lanes.cpp b/src/lanes.cpp index b7cd148..9b3b28c 100644 --- a/src/lanes.cpp +++ b/src/lanes.cpp | |||
@@ -479,7 +479,7 @@ LUAG_FUNC(lane_new) | |||
479 | STACK_CHECK(_L2, 0); | 479 | STACK_CHECK(_L2, 0); |
480 | 480 | ||
481 | // Lane main function | 481 | // Lane main function |
482 | [[maybe_unused]] int const errorHandlerCount{ _lane->pushErrorHandler() }; // L_: [fixed] args... L2: eh? | 482 | [[maybe_unused]] int const _errorHandlerCount{ _lane->pushErrorHandler() }; // L_: [fixed] args... L2: eh? |
483 | LuaType const _func_type{ luaG_type(L_, kFuncIdx) }; | 483 | LuaType const _func_type{ luaG_type(L_, kFuncIdx) }; |
484 | if (_func_type == LuaType::FUNCTION) { | 484 | if (_func_type == LuaType::FUNCTION) { |
485 | DEBUGSPEW_CODE(DebugSpew(_U) << "lane_new: transfer lane body" << std::endl); | 485 | DEBUGSPEW_CODE(DebugSpew(_U) << "lane_new: transfer lane body" << std::endl); |
@@ -497,11 +497,11 @@ LUAG_FUNC(lane_new) | |||
497 | raise_luaL_error(L_, "error when parsing lane function code"); | 497 | raise_luaL_error(L_, "error when parsing lane function code"); |
498 | } | 498 | } |
499 | } else { | 499 | } else { |
500 | raise_luaL_error(L_, "Expected function, got %s", luaG_typename(L_, _func_type)); | 500 | raise_luaL_error(L_, "Expected function, got %s", luaG_typename(L_, _func_type).data()); |
501 | } | 501 | } |
502 | STACK_CHECK(L_, 0); | 502 | STACK_CHECK(L_, 0); |
503 | STACK_CHECK(_L2, errorHandlerCount + 1); | 503 | STACK_CHECK(_L2, _errorHandlerCount + 1); |
504 | LUA_ASSERT(L_, lua_isfunction(_L2, errorHandlerCount + 1)); | 504 | LUA_ASSERT(L_, lua_isfunction(_L2, _errorHandlerCount + 1)); |
505 | 505 | ||
506 | // revive arguments | 506 | // revive arguments |
507 | if (_nargs > 0) { | 507 | if (_nargs > 0) { |
@@ -520,7 +520,7 @@ LUAG_FUNC(lane_new) | |||
520 | kLanePointerRegKey.setValue( | 520 | kLanePointerRegKey.setValue( |
521 | _L2, [lane = _lane](lua_State* L_) { lua_pushlightuserdata(L_, lane); } // L_: [fixed] L2: eh? func args... | 521 | _L2, [lane = _lane](lua_State* L_) { lua_pushlightuserdata(L_, lane); } // L_: [fixed] L2: eh? func args... |
522 | ); | 522 | ); |
523 | STACK_CHECK(_L2, errorHandlerCount + 1 + _nargs); | 523 | STACK_CHECK(_L2, _errorHandlerCount + 1 + _nargs); |
524 | 524 | ||
525 | STACK_CHECK_RESET_REL(L_, 0); | 525 | STACK_CHECK_RESET_REL(L_, 0); |
526 | // all went well, the lane's thread can start working | 526 | // all went well, the lane's thread can start working |