diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 21:14:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 21:14:51 +0000 |
commit | bc282425088455198a7a99511c75914477d4ed32 (patch) | |
tree | 1b1fb887a634136a093deea7e4dd95d054201e7a /ext/luawrapper/include/LuaContext.hpp | |
parent | Releasing progress-linux version 1.8.3-3~progress7.99u1. (diff) | |
download | dnsdist-bc282425088455198a7a99511c75914477d4ed32.tar.xz dnsdist-bc282425088455198a7a99511c75914477d4ed32.zip |
Merging upstream version 1.9.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ext/luawrapper/include/LuaContext.hpp')
-rw-r--r-- | ext/luawrapper/include/LuaContext.hpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/luawrapper/include/LuaContext.hpp b/ext/luawrapper/include/LuaContext.hpp index ad6c86e..655375e 100644 --- a/ext/luawrapper/include/LuaContext.hpp +++ b/ext/luawrapper/include/LuaContext.hpp @@ -1643,6 +1643,7 @@ private: // creating the object // lua_newuserdata allocates memory in the internals of the lua library and returns it so we can fill it // and that's what we do with placement-new + static_assert(alignof(TType) <= 8); const auto pointerLocation = static_cast<TType*>(lua_newuserdata(state, sizeof(TType))); new (pointerLocation) TType(std::forward<TType2>(value)); } @@ -2292,6 +2293,7 @@ struct LuaContext::Pusher<TReturnType (TParameters...)> // creating the object // lua_newuserdata allocates memory in the internals of the lua library and returns it so we can fill it // and that's what we do with placement-new + // static_assert(alignof(TFunctionObject) <= 8); XXX trips on at least c++lib 17, see #13766 const auto functionLocation = static_cast<TFunctionObject*>(lua_newuserdata(state, sizeof(TFunctionObject))); new (functionLocation) TFunctionObject(std::move(fn)); @@ -2335,6 +2337,7 @@ struct LuaContext::Pusher<TReturnType (TParameters...)> }; // we copy the function object onto the stack + static_assert(alignof(TFunctionObject) <= 8); const auto functionObjectLocation = static_cast<TFunctionObject*>(lua_newuserdata(state, sizeof(TFunctionObject))); new (functionObjectLocation) TFunctionObject(std::move(fn)); |