diff --git a/thirdparty/sol/sol.hpp b/thirdparty/sol/sol.hpp index bbf894233d..a4c8b972c5 100644 --- a/thirdparty/sol/sol.hpp +++ b/thirdparty/sol/sol.hpp @@ -20135,7 +20135,7 @@ namespace sol { using uFx = meta::unqualified_t; if constexpr (sizeof...(Args) < 1) { using C = typename meta::bind_traits::object_type; - lua_CFunction freefunc = &function_detail::upvalue_this_member_variable::template call; + lua_CFunction freefunc = [](lua_State* pl) -> int { return function_detail::upvalue_this_member_variable::template call(pl); }; int upvalues = 0; upvalues += stack::push(L, nullptr); @@ -20147,7 +20147,7 @@ namespace sol { constexpr bool is_reference = meta::is_specialization_of_v || std::is_pointer_v; if constexpr (meta::is_specialization_of_v) { lua_CFunction freefunc - = &function_detail::upvalue_this_member_variable::template call; + = [](lua_State* pl) -> auto { return function_detail::upvalue_this_member_variable::template call(pl); }; int upvalues = 0; upvalues += stack::push(L, nullptr); @@ -20158,8 +20158,8 @@ namespace sol { typedef std::decay_t dFx; dFx memfxptr(std::forward(fx)); auto userptr = detail::ptr(std::forward(args)...); - lua_CFunction freefunc = &function_detail::upvalue_member_variable, - meta::unqualified_t>::template call; + lua_CFunction freefunc = [](lua_State* pl) -> auto { return function_detail::upvalue_member_variable, + meta::unqualified_t>::template call(pl); }; int upvalues = 0; upvalues += stack::push(L, nullptr); @@ -20188,7 +20188,7 @@ namespace sol { if constexpr (meta::is_specialization_of_v) { (void)obj; using C = typename Tu::type; - lua_CFunction freefunc = &function_detail::upvalue_this_member_function::template call; + lua_CFunction freefunc = [](lua_State* pl) -> auto { return function_detail::upvalue_this_member_function::template call(pl); }; int upvalues = 0; upvalues += stack::push(L, nullptr); @@ -20200,7 +20200,7 @@ namespace sol { if constexpr (is_reference) { auto userptr = detail::ptr(std::forward(obj)); lua_CFunction freefunc - = &function_detail::upvalue_member_function, dFx>::template call; + = [](lua_State* pl) -> auto { return function_detail::upvalue_member_function, dFx>::template call(pl); }; int upvalues = 0; upvalues += stack::push(L, nullptr); @@ -20220,7 +20220,7 @@ namespace sol { using dFx = std::decay_t; if constexpr (sizeof...(Args) < 1) { using C = typename meta::bind_traits>::object_type; - lua_CFunction freefunc = &function_detail::upvalue_this_member_function::template call; + lua_CFunction freefunc = [](lua_State* pl) -> auto { return function_detail::upvalue_this_member_function::template call(pl); }; int upvalues = 0; upvalues += stack::push(L, nullptr); @@ -20282,7 +20282,7 @@ namespace sol { } else if constexpr (std::is_function_v>) { std::decay_t target(std::forward(fx), std::forward(args)...); - lua_CFunction freefunc = &function_detail::upvalue_free_function::template call; + lua_CFunction freefunc = [](lua_State* pl) -> auto { return function_detail::upvalue_free_function::template call(pl); }; int upvalues = 0; upvalues += stack::push(L, nullptr);