diff options
Diffstat (limited to 'src/allocator.hpp')
-rw-r--r-- | src/allocator.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/allocator.hpp b/src/allocator.hpp index c073391..b578f12 100644 --- a/src/allocator.hpp +++ b/src/allocator.hpp | |||
@@ -33,6 +33,8 @@ namespace lanes { | |||
33 | // can't actually delete the operator because the compiler generates stack unwinding code that could call it in case of exception | 33 | // can't actually delete the operator because the compiler generates stack unwinding code that could call it in case of exception |
34 | static void operator delete([[maybe_unused]] void* const p_, [[maybe_unused]] lua_State* const L_) {} | 34 | static void operator delete([[maybe_unused]] void* const p_, [[maybe_unused]] lua_State* const L_) {} |
35 | 35 | ||
36 | ~AllocatorDefinition() = default; | ||
37 | |||
36 | AllocatorDefinition(lua_Alloc const allocF_, void* const allocUD_) noexcept | 38 | AllocatorDefinition(lua_Alloc const allocF_, void* const allocUD_) noexcept |
37 | : allocF{ allocF_ } | 39 | : allocF{ allocF_ } |
38 | , allocUD{ allocUD_ } | 40 | , allocUD{ allocUD_ } |
@@ -64,7 +66,7 @@ namespace lanes { | |||
64 | [[nodiscard]] | 66 | [[nodiscard]] |
65 | lua_State* newState() const | 67 | lua_State* newState() const |
66 | { | 68 | { |
67 | return lua_newstate(allocF, allocUD); | 69 | return luaW_newstate(allocF, allocUD, luaL_makeseed(nullptr)); |
68 | } | 70 | } |
69 | 71 | ||
70 | [[nodiscard]] | 72 | [[nodiscard]] |