From 06dfed4204292f80b7904126ae5f47f768285d7c Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Sat, 4 Aug 2018 15:01:44 +0100 Subject: [PATCH 1/4] Fix build when SOL_STRINGS_ARE_NUMBERS is set --- sol/stack_check_unqualified.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sol/stack_check_unqualified.hpp b/sol/stack_check_unqualified.hpp index 3ad01856..b05f73ce 100644 --- a/sol/stack_check_unqualified.hpp +++ b/sol/stack_check_unqualified.hpp @@ -149,9 +149,9 @@ namespace stack { if (!success) { // expected type, actual type #if defined(SOL_STRINGS_ARE_NUMBERS) && SOL_STRINGS_ARE_NUMBERS - handler(L, index, type::number, t, "not a numeric type"); -#else handler(L, index, type::number, type_of(L, index), "not a numeric type or numeric string"); +#else + handler(L, index, type::number, t, "not a numeric type"); #endif } return success; From 92fa032ff4ed8c9168f395409be84416c4e0c34b Mon Sep 17 00:00:00 2001 From: ThePhD Date: Sat, 4 Aug 2018 11:00:17 -0400 Subject: [PATCH 2/4] fix arity accumulation --- sol/types.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sol/types.hpp b/sol/types.hpp index 8357fa55..90efe329 100644 --- a/sol/types.hpp +++ b/sol/types.hpp @@ -1046,6 +1046,12 @@ namespace sol { template class V, typename T, typename... Args> struct accumulate : accumulate::value, V, Args...> {}; + + template class V, typename List> + struct accumulate_list; + + template class V, typename... Args> + struct accumulate_list> : accumulate {}; } // namespace detail template @@ -1152,9 +1158,9 @@ namespace sol { public: typedef std::integral_constant::value != 0> runtime_variadics_t; static const std::size_t true_arity = base_t::arity; - static const std::size_t arity = base_t::arity - meta::count_for::value; + static const std::size_t arity = detail::accumulate_list::value - meta::count_for::value; static const std::size_t true_free_arity = base_t::free_arity; - static const std::size_t free_arity = base_t::free_arity - meta::count_for::value; + static const std::size_t free_arity = detail::accumulate_list::value - meta::count_for::value; }; template From daa9993a3e5f1ef24bb7a94a5a50d208a8de6486 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Sat, 4 Aug 2018 11:01:38 -0400 Subject: [PATCH 3/4] update single --- single/sol/sol.hpp | 18 ++++++++++++------ single/sol/sol_forward.hpp | 4 ++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index 6df2a179..5501d6a9 100644 --- a/single/sol/sol.hpp +++ b/single/sol/sol.hpp @@ -20,8 +20,8 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // This file was generated with a script. -// Generated 2018-07-29 18:04:21.688310 UTC -// This header was generated with sol v2.20.4 (revision d01d49a) +// Generated 2018-08-04 15:01:07.072485 UTC +// This header was generated with sol v2.20.4 (revision 92fa032) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -5625,6 +5625,12 @@ namespace sol { template class V, typename T, typename... Args> struct accumulate : accumulate::value, V, Args...> {}; + + template class V, typename List> + struct accumulate_list; + + template class V, typename... Args> + struct accumulate_list> : accumulate {}; } // namespace detail template @@ -5731,9 +5737,9 @@ namespace sol { public: typedef std::integral_constant::value != 0> runtime_variadics_t; static const std::size_t true_arity = base_t::arity; - static const std::size_t arity = base_t::arity - meta::count_for::value; + static const std::size_t arity = detail::accumulate_list::value - meta::count_for::value; static const std::size_t true_free_arity = base_t::free_arity; - static const std::size_t free_arity = base_t::free_arity - meta::count_for::value; + static const std::size_t free_arity = detail::accumulate_list::value - meta::count_for::value; }; template @@ -8249,9 +8255,9 @@ namespace stack { if (!success) { // expected type, actual type #if defined(SOL_STRINGS_ARE_NUMBERS) && SOL_STRINGS_ARE_NUMBERS - handler(L, index, type::number, t, "not a numeric type"); -#else handler(L, index, type::number, type_of(L, index), "not a numeric type or numeric string"); +#else + handler(L, index, type::number, t, "not a numeric type"); #endif } return success; diff --git a/single/sol/sol_forward.hpp b/single/sol/sol_forward.hpp index f60623ef..c6773db8 100644 --- a/single/sol/sol_forward.hpp +++ b/single/sol/sol_forward.hpp @@ -20,8 +20,8 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // This file was generated with a script. -// Generated 2018-07-29 18:04:22.074805 UTC -// This header was generated with sol v2.20.4 (revision d01d49a) +// Generated 2018-08-04 15:01:07.320824 UTC +// This header was generated with sol v2.20.4 (revision 92fa032) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP From 7f1c2e3ecfc2b78e396c60e067f6486ae1df66c5 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Sat, 4 Aug 2018 11:59:29 -0400 Subject: [PATCH 4/4] committing, with signing --- single/sol/sol.hpp | 4 ++-- single/sol/sol_forward.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index 5501d6a9..26ac864c 100644 --- a/single/sol/sol.hpp +++ b/single/sol/sol.hpp @@ -20,8 +20,8 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // This file was generated with a script. -// Generated 2018-08-04 15:01:07.072485 UTC -// This header was generated with sol v2.20.4 (revision 92fa032) +// Generated 2018-08-04 15:02:30.421859 UTC +// This header was generated with sol v2.20.3 (revision daa9993) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP diff --git a/single/sol/sol_forward.hpp b/single/sol/sol_forward.hpp index c6773db8..2b821d48 100644 --- a/single/sol/sol_forward.hpp +++ b/single/sol/sol_forward.hpp @@ -20,8 +20,8 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // This file was generated with a script. -// Generated 2018-08-04 15:01:07.320824 UTC -// This header was generated with sol v2.20.4 (revision 92fa032) +// Generated 2018-08-04 15:02:30.657205 UTC +// This header was generated with sol v2.20.3 (revision daa9993) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP