aboutsummaryrefslogtreecommitdiff
path: root/src/universe.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/universe.h')
-rw-r--r--src/universe.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/universe.h b/src/universe.h
index 6ccdaca..6374648 100644
--- a/src/universe.h
+++ b/src/universe.h
@@ -84,7 +84,7 @@ class Universe
84 lua_CFunction provideAllocator{ nullptr }; 84 lua_CFunction provideAllocator{ nullptr };
85 85
86 // after a state is created, this function will be called right after the bases libraries are loaded 86 // after a state is created, this function will be called right after the bases libraries are loaded
87 lua_CFunction onStateCreateFunc{ nullptr }; 87 std::variant<std::nullptr_t, uintptr_t, lua_CFunction> onStateCreateFunc;
88 88
89 // if allocator="protected" is found in the configuration settings, a wrapper allocator will protect all allocator calls with a mutex 89 // if allocator="protected" is found in the configuration settings, a wrapper allocator will protect all allocator calls with a mutex
90 // contains a mutex and the original allocator definition 90 // contains a mutex and the original allocator definition
@@ -131,10 +131,12 @@ class Universe
131 Universe& operator=(Universe const&) = delete; 131 Universe& operator=(Universe const&) = delete;
132 Universe& operator=(Universe&&) = delete; 132 Universe& operator=(Universe&&) = delete;
133 133
134 void callOnStateCreate(lua_State* const L_, lua_State* const from_, LookupMode const mode_);
134 [[nodiscard]] static Universe* Create(lua_State* L_); 135 [[nodiscard]] static Universe* Create(lua_State* L_);
135 [[nodiscard]] static inline Universe* Get(lua_State* L_); 136 [[nodiscard]] static inline Universe* Get(lua_State* L_);
136 void initializeAllocatorFunction(lua_State* L_); 137 void initializeAllocatorFunction(lua_State* L_);
137 static int InitializeFinalizer(lua_State* L_); 138 static int InitializeFinalizer(lua_State* L_);
139 void initializeOnStateCreate(lua_State* const L_);
138 lanes::AllocatorDefinition resolveAllocator(lua_State* const L_, std::string_view const& hint_) const; 140 lanes::AllocatorDefinition resolveAllocator(lua_State* const L_, std::string_view const& hint_) const;
139 static inline void Store(lua_State* L_, Universe* U_); 141 static inline void Store(lua_State* L_, Universe* U_);
140 void terminateFreeRunningLanes(lua_State* L_, lua_Duration shutdownTimeout_, CancelOp op_); 142 void terminateFreeRunningLanes(lua_State* L_, lua_Duration shutdownTimeout_, CancelOp op_);