diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-06-18 10:06:53 +0200 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-06-18 10:06:53 +0200 |
commit | 3229fa753cef10eda963247eaedec1d6ed9de9e4 (patch) | |
tree | 6b8ab7c1895aee63e4db3cca0b38c9a812430a2f /src/state.cpp | |
parent | e3818609b54c81a83aa73beb322ea9c282b7add8 (diff) | |
download | lanes-3229fa753cef10eda963247eaedec1d6ed9de9e4.tar.gz lanes-3229fa753cef10eda963247eaedec1d6ed9de9e4.tar.bz2 lanes-3229fa753cef10eda963247eaedec1d6ed9de9e4.zip |
Moved AllocatorDefinition in a lanes namespace
Diffstat (limited to 'src/state.cpp')
-rw-r--r-- | src/state.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/state.cpp b/src/state.cpp index bae2ba5..6d3910b 100644 --- a/src/state.cpp +++ b/src/state.cpp | |||
@@ -209,8 +209,8 @@ namespace state { | |||
209 | lua_pushcclosure(from, U->provideAllocator, 0); // L: provideAllocator() | 209 | lua_pushcclosure(from, U->provideAllocator, 0); // L: provideAllocator() |
210 | luaG_pushstring(from, hint); // L: provideAllocator() "<hint>" | 210 | luaG_pushstring(from, hint); // L: provideAllocator() "<hint>" |
211 | lua_call(from, 1, 1); // L: result | 211 | lua_call(from, 1, 1); // L: result |
212 | AllocatorDefinition* const _def{ luaG_tofulluserdata<AllocatorDefinition>(from, -1) }; | 212 | lanes::AllocatorDefinition* const _def{ luaG_tofulluserdata<lanes::AllocatorDefinition>(from, -1) }; |
213 | if (!_def || _def->version != AllocatorDefinition::kAllocatorVersion) { | 213 | if (!_def || _def->version != lanes::AllocatorDefinition::kAllocatorVersion) { |
214 | raise_luaL_error(from, "Bad config.allocator function, must provide a valid AllocatorDefinition"); | 214 | raise_luaL_error(from, "Bad config.allocator function, must provide a valid AllocatorDefinition"); |
215 | } | 215 | } |
216 | lua_State* const _L{ lua_newstate(_def->allocF, _def->allocUD) }; | 216 | lua_State* const _L{ lua_newstate(_def->allocF, _def->allocUD) }; |