aboutsummaryrefslogtreecommitdiff
path: root/src/state.cpp
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-03-27 10:37:05 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2024-03-27 10:37:05 +0100
commit9e3ca50cfafa0d7dc3e15f3b6a635aef6a938b80 (patch)
tree0b8dcb8cf1d90fedca7234e8a0179a09514a12bc /src/state.cpp
parentf214d35df5f09e7026dafd8553e83cc6ea21cbde (diff)
downloadlanes-9e3ca50cfafa0d7dc3e15f3b6a635aef6a938b80.tar.gz
lanes-9e3ca50cfafa0d7dc3e15f3b6a635aef6a938b80.tar.bz2
lanes-9e3ca50cfafa0d7dc3e15f3b6a635aef6a938b80.zip
C++ migration: new helper templates lua_tolightuserdata and lua_tofulluserdata
Diffstat (limited to 'src/state.cpp')
-rw-r--r--src/state.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/state.cpp b/src/state.cpp
index b46a145..817d5b4 100644
--- a/src/state.cpp
+++ b/src/state.cpp
@@ -259,7 +259,7 @@ lua_State* create_state( Universe* U, lua_State* from_)
259 lua_pushcclosure( from_, U->provide_allocator, 0); 259 lua_pushcclosure( from_, U->provide_allocator, 0);
260 lua_call( from_, 0, 1); 260 lua_call( from_, 0, 1);
261 { 261 {
262 AllocatorDefinition* const def{ lua_touserdata<AllocatorDefinition>(from_, -1) }; 262 AllocatorDefinition* const def{ lua_tofulluserdata<AllocatorDefinition>(from_, -1) };
263 L = lua_newstate( def->m_allocF, def->m_allocUD); 263 L = lua_newstate( def->m_allocF, def->m_allocUD);
264 } 264 }
265 lua_pop( from_, 1); 265 lua_pop( from_, 1);