diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-10-08 18:42:39 +0200 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-10-08 18:42:39 +0200 |
commit | 16b5070c0cd56e10c5074eb9903dbc3ae4e15a61 (patch) | |
tree | f6d5cdb74b505e13aa3261f7ab6192da0133b7b9 /src/lane.h | |
parent | e939e5e6a894a042d3301e47faa05264445f27f6 (diff) | |
download | lanes-16b5070c0cd56e10c5074eb9903dbc3ae4e15a61.tar.gz lanes-16b5070c0cd56e10c5074eb9903dbc3ae4e15a61.tar.bz2 lanes-16b5070c0cd56e10c5074eb9903dbc3ae4e15a61.zip |
Sprinkling StackIndex all over the place
Diffstat (limited to 'src/lane.h')
-rw-r--r-- | src/lane.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -146,7 +146,7 @@ class Lane | |||
146 | public: | 146 | public: |
147 | 147 | ||
148 | CancelResult cancel(CancelOp op_, int hookCount_, std::chrono::time_point<std::chrono::steady_clock> until_, bool wakeLane_); | 148 | CancelResult cancel(CancelOp op_, int hookCount_, std::chrono::time_point<std::chrono::steady_clock> until_, bool wakeLane_); |
149 | void changeDebugName(int const nameIdx_); | 149 | void changeDebugName(StackIndex nameIdx_); |
150 | void closeState() | 150 | void closeState() |
151 | { | 151 | { |
152 | lua_State* _L{ S }; | 152 | lua_State* _L{ S }; |
@@ -173,7 +173,7 @@ class Lane | |||
173 | static void PushMetatable(lua_State* L_); | 173 | static void PushMetatable(lua_State* L_); |
174 | void pushStatusString(lua_State* L_) const; | 174 | void pushStatusString(lua_State* L_) const; |
175 | void pushIndexedResult(lua_State* L_, int key_) const; | 175 | void pushIndexedResult(lua_State* L_, int key_) const; |
176 | void resetResultsStorage(lua_State* const L_, int gc_cb_idx_); | 176 | void resetResultsStorage(lua_State* L_, StackIndex self_idx_); |
177 | void selfdestructAdd(); | 177 | void selfdestructAdd(); |
178 | [[nodiscard]] bool selfdestructRemove(); | 178 | [[nodiscard]] bool selfdestructRemove(); |
179 | void securizeDebugName(lua_State* L_); | 179 | void securizeDebugName(lua_State* L_); |
@@ -190,7 +190,7 @@ class Lane | |||
190 | // 'Lane' are malloc/free'd and the handle only carries a pointer. | 190 | // 'Lane' are malloc/free'd and the handle only carries a pointer. |
191 | // This is not deep userdata since the handle is not portable among lanes. | 191 | // This is not deep userdata since the handle is not portable among lanes. |
192 | // | 192 | // |
193 | [[nodiscard]] inline Lane* ToLane(lua_State* L_, int i_) | 193 | [[nodiscard]] inline Lane* ToLane(lua_State* const L_, StackIndex const i_) |
194 | { | 194 | { |
195 | return *(static_cast<Lane**>(luaL_checkudata(L_, i_, kLaneMetatableName))); | 195 | return *(static_cast<Lane**>(luaL_checkudata(L_, i_, kLaneMetatableName))); |
196 | } | 196 | } |