diff options
Diffstat (limited to 'src/lanes.cpp')
| -rw-r--r-- | src/lanes.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lanes.cpp b/src/lanes.cpp index 5b9eb2b..74a9d95 100644 --- a/src/lanes.cpp +++ b/src/lanes.cpp | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * LANES.CPP Copyright (c) 2007-08, Asko Kauppi | 2 | * LANES.CPP Copyright (c) 2007-08, Asko Kauppi |
| 3 | * Copyright (C) 2009-24, Benoit Germain | 3 | * Copyright (C) 2009-26, Benoit Germain |
| 4 | * | 4 | * |
| 5 | * Multithreading in Lua. | 5 | * Multithreading in Lua. |
| 6 | * | 6 | * |
| @@ -56,7 +56,7 @@ | |||
| 56 | =============================================================================== | 56 | =============================================================================== |
| 57 | 57 | ||
| 58 | Copyright (C) 2007-10 Asko Kauppi <akauppi@gmail.com> | 58 | Copyright (C) 2007-10 Asko Kauppi <akauppi@gmail.com> |
| 59 | 2011-24 Benoit Germain <bnt.germain@gmail.com> | 59 | 2011-26 Benoit Germain <bnt.germain@gmail.com> |
| 60 | 60 | ||
| 61 | Permission is hereby granted, free of charge, to any person obtaining a copy | 61 | Permission is hereby granted, free of charge, to any person obtaining a copy |
| 62 | of this software and associated documentation files (the "Software"), to deal | 62 | of this software and associated documentation files (the "Software"), to deal |
| @@ -267,7 +267,8 @@ namespace { | |||
| 267 | 267 | ||
| 268 | // Read the priority-is-native flag and optional priority integer from the lane_new() argument stack. | 268 | // Read the priority-is-native flag and optional priority integer from the lane_new() argument stack. |
| 269 | // Validates the mapped priority range if native mode is not requested. | 269 | // Validates the mapped priority range if native mode is not requested. |
| 270 | [[nodiscard]] static LanePriority ResolveLanePriority(lua_State* const L_, StackIndex const prinIdx_, StackIndex const prioIdx_) | 270 | [[nodiscard]] |
| 271 | static LanePriority ResolveLanePriority(lua_State* const L_, StackIndex const prinIdx_, StackIndex const prioIdx_) | ||
| 271 | { | 272 | { |
| 272 | NativePrioFlag const _native{ static_cast<bool>(lua_toboolean(L_, prinIdx_)) }; | 273 | NativePrioFlag const _native{ static_cast<bool>(lua_toboolean(L_, prinIdx_)) }; |
| 273 | if (lua_isnoneornil(L_, prioIdx_)) { | 274 | if (lua_isnoneornil(L_, prioIdx_)) { |
| @@ -373,7 +374,8 @@ namespace { | |||
| 373 | // Push the optional error handler onto L2, then transfer the lane body (a Lua function or | 374 | // Push the optional error handler onto L2, then transfer the lane body (a Lua function or |
| 374 | // a string to be compiled) from L_ into L2_. Returns the error handler count (0 or 1) so | 375 | // a string to be compiled) from L_ into L2_. Returns the error handler count (0 or 1) so |
| 375 | // the caller can assert the correct L2 stack depth after arguments are transferred. | 376 | // the caller can assert the correct L2 stack depth after arguments are transferred. |
| 376 | [[nodiscard]] static int TransferLaneBody(Universe* const U_, lua_State* const L_, lua_State* const L2_, StackIndex const funcIdx_, Lane* const lane_) | 377 | [[nodiscard]] |
| 378 | static int TransferLaneBody(Universe* const U_, lua_State* const L_, lua_State* const L2_, StackIndex const funcIdx_, Lane* const lane_) | ||
| 377 | { | 379 | { |
| 378 | int const _errorHandlerCount{ lane_->pushErrorHandler() }; // L_: [fixed] args... L2: eh? | 380 | int const _errorHandlerCount{ lane_->pushErrorHandler() }; // L_: [fixed] args... L2: eh? |
| 379 | LuaType const _func_type{ luaW_type(L_, funcIdx_) }; | 381 | LuaType const _func_type{ luaW_type(L_, funcIdx_) }; |
