diff options
Diffstat (limited to 'deep_userdata_example')
| -rw-r--r-- | deep_userdata_example/deep_userdata_example.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/deep_userdata_example/deep_userdata_example.cpp b/deep_userdata_example/deep_userdata_example.cpp index a45cc7f..075cfbe 100644 --- a/deep_userdata_example/deep_userdata_example.cpp +++ b/deep_userdata_example/deep_userdata_example.cpp | |||
| @@ -261,21 +261,21 @@ static int clonable_gc(lua_State* const L_) | |||
| 261 | 261 | ||
| 262 | // this is all we need to make a userdata lanes-clonable. no dependency on Lanes code. | 262 | // this is all we need to make a userdata lanes-clonable. no dependency on Lanes code. |
| 263 | [[nodiscard]] | 263 | [[nodiscard]] |
| 264 | static int clonable_lanesclone(lua_State* L) | 264 | static int clonable_lanesclone(lua_State* const L_) |
| 265 | { | 265 | { |
| 266 | switch (lua_gettop(L)) { | 266 | switch (lua_gettop(L_)) { |
| 267 | case 3: | 267 | case 3: |
| 268 | { | 268 | { |
| 269 | MyClonableUserdata* self = static_cast<MyClonableUserdata*>(lua_touserdata(L, 1)); | 269 | MyClonableUserdata* const _self = static_cast<MyClonableUserdata*>(lua_touserdata(L_, 1)); |
| 270 | MyClonableUserdata* from = static_cast<MyClonableUserdata*>(lua_touserdata(L, 2)); | 270 | MyClonableUserdata* const _from = static_cast<MyClonableUserdata*>(lua_touserdata(L_, 2)); |
| 271 | size_t len = lua_tointeger(L, 3); | 271 | auto const _len{ static_cast<size_t>(lua_tointeger(L_, 3)) }; // make 32-bits builds happy |
| 272 | assert(len == sizeof(MyClonableUserdata)); | 272 | assert(_len == sizeof(MyClonableUserdata)); |
| 273 | *self = *from; | 273 | *_self = *_from; |
| 274 | } | 274 | } |
| 275 | return 0; | 275 | return 0; |
| 276 | 276 | ||
| 277 | default: | 277 | default: |
| 278 | raise_luaL_error(L, "Lanes called clonable_lanesclone with unexpected arguments"); | 278 | raise_luaL_error(L_, "Lanes called clonable_lanesclone with unexpected arguments"); |
| 279 | } | 279 | } |
| 280 | return 0; | 280 | return 0; |
| 281 | } | 281 | } |
