From c53fa6d2b5f59d737b830021eb0872622b2058a2 Mon Sep 17 00:00:00 2001 From: Roman Sztergbaum Date: Fri, 22 Jun 2018 22:02:11 +0200 Subject: [PATCH 01/15] fix sol2-config.cmake.in --- cmake/sol2-config.cmake.in | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/cmake/sol2-config.cmake.in b/cmake/sol2-config.cmake.in index 9c69beb4..c15c0e5d 100644 --- a/cmake/sol2-config.cmake.in +++ b/cmake/sol2-config.cmake.in @@ -26,13 +26,16 @@ include("${CMAKE_CURRENT_LIST_DIR}/sol2-targets.cmake") MESSAGE(STATUS ${CMAKE_CURRENT_LIST_DIR}) -get_target_property(SOL_INCLUDE_DIRS - sol2 INTERFACE_INCLUDE_DIRECTORIES) +if (TARGET sol2) + get_target_property(SOL2_INCLUDE_DIRS + sol2 INTERFACE_INCLUDE_DIRECTORIES) + set_and_check(SOL2_INCLUDE_DIRS "${SOL2_INCLUDE_DIRS}") + set(SOL2_LIBRARIES sol2) +endif() -get_target_property(SOL_SINGLE_INCLUDE_DIRS - sol2_single INTERFACE_INCLUDE_DIRECTORIES) - -set_and_check(SOL2_INCLUDE_DIRS "${SOL2_INCLUDE_DIRS}") -set_and_check(SOL2_INCLUDE_DIRS "${SOL2_SINGLE_INCLUDE_DIRS}") -set(SOL2_LIBRARIES sol2) -set(SOL2_LIBRARIES_SINGLE sol2_single) +if(TARGET sol2_single) + get_target_property(SOL_SINGLE_INCLUDE_DIRS + sol2_single INTERFACE_INCLUDE_DIRECTORIES) + set_and_check(SOL2_INCLUDE_DIRS "${SOL2_SINGLE_INCLUDE_DIRS}") + set(SOL2_LIBRARIES_SINGLE sol2_single) +endif() From 31846287845a372149239aa553cbe397e6b9f06a Mon Sep 17 00:00:00 2001 From: Sztergbaum Roman Date: Fri, 22 Jun 2018 22:06:47 +0200 Subject: [PATCH 02/15] Update sol2-config.cmake.in --- cmake/sol2-config.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/sol2-config.cmake.in b/cmake/sol2-config.cmake.in index c15c0e5d..e43edddf 100644 --- a/cmake/sol2-config.cmake.in +++ b/cmake/sol2-config.cmake.in @@ -34,7 +34,7 @@ if (TARGET sol2) endif() if(TARGET sol2_single) - get_target_property(SOL_SINGLE_INCLUDE_DIRS + get_target_property(SOL2_SINGLE_INCLUDE_DIRS sol2_single INTERFACE_INCLUDE_DIRECTORIES) set_and_check(SOL2_INCLUDE_DIRS "${SOL2_SINGLE_INCLUDE_DIRS}") set(SOL2_LIBRARIES_SINGLE sol2_single) From d72b243c717159b2e44f2dc12d25752be578e2ec Mon Sep 17 00:00:00 2001 From: Roman Sztergbaum Date: Sat, 23 Jun 2018 10:43:51 +0200 Subject: [PATCH 03/15] fix install interface --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index abd298f8..ba52ded8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,7 +141,7 @@ CMAKE_DEPENDENT_OPTION(TESTS_DYNAMIC_LOADING_EXAMPLES "Enable build of dynamic l add_library(sol2 INTERFACE) target_include_directories(sol2 INTERFACE $ - $) + $) # # Version configurations configure_package_config_file( From 301547f2603368041fe15eed87fe5d1a6ae90da2 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Tue, 26 Jun 2018 15:57:22 -0400 Subject: [PATCH 04/15] fix #674 fix #673 make a full decision on #672; not worth the implementation effort --- sol/stack_check_get_qualified.hpp | 19 ++----------------- sol/stack_check_get_unqualified.hpp | 10 +--------- sol/stack_core.hpp | 3 ++- sol/types.hpp | 2 +- sol/usertype_core.hpp | 2 +- tests/tests.cpp | 21 +++++++++++++++++++++ 6 files changed, 28 insertions(+), 29 deletions(-) diff --git a/sol/stack_check_get_qualified.hpp b/sol/stack_check_get_qualified.hpp index 06f2a4bc..164d5cd0 100644 --- a/sol/stack_check_get_qualified.hpp +++ b/sol/stack_check_get_qualified.hpp @@ -25,27 +25,12 @@ #define SOL_STACK_CHECK_QUALIFIED_GET_HPP #include "stack_core.hpp" -#include "stack_get.hpp" -#include "stack_check.hpp" -#include "optional.hpp" -#include -#include +#include "stack_check_get_unqualified.hpp" namespace sol { namespace stack { template - struct qualified_check_getter { - typedef decltype(stack_detail::unchecked_get(nullptr, 0, std::declval())) R; - - template - static optional get(lua_State* L, int index, Handler&& handler, record& tracking) { - if (!check(L, index, std::forward(handler))) { - tracking.use(static_cast(!lua_isnone(L, index))); - return nullopt; - } - return stack_detail::unchecked_get(L, index, tracking); - } - }; + struct qualified_check_getter : check_getter, C> {}; } } // namespace sol::stack diff --git a/sol/stack_check_get_unqualified.hpp b/sol/stack_check_get_unqualified.hpp index de45076a..4bb3ed95 100644 --- a/sol/stack_check_get_unqualified.hpp +++ b/sol/stack_check_get_unqualified.hpp @@ -53,7 +53,7 @@ namespace stack { static optional get(lua_State* L, int index, Handler&& handler, record& tracking) { // actually check if it's none here, otherwise // we'll have a none object inside an optional! - bool success = stack::check(L, index, no_panic); + bool success = lua_isnoneornil(L, index) == 0 && stack::check(L, index, no_panic); if (!success) { // expected type, actual type tracking.use(static_cast(success)); @@ -64,14 +64,6 @@ namespace stack { } }; - template - struct check_getter> { - template - static decltype(auto) get(lua_State* L, int index, Handler&&, record& tracking) { - return check_get(L, index, no_panic, tracking); - } - }; - template struct check_getter::value && lua_type_of::value == type::number>> { template diff --git a/sol/stack_core.hpp b/sol/stack_core.hpp index f3a2b789..ea36cd38 100644 --- a/sol/stack_core.hpp +++ b/sol/stack_core.hpp @@ -767,7 +767,8 @@ namespace sol { template inline decltype(auto) unqualified_check_get(lua_State* L, int index, Handler&& handler, record& tracking) { - check_getter cg{}; + typedef meta::unqualified_t Tu; + check_getter cg{}; (void)cg; return cg.get(L, index, std::forward(handler), tracking); } diff --git a/sol/types.hpp b/sol/types.hpp index 2a7da05c..e06ffba3 100644 --- a/sol/types.hpp +++ b/sol/types.hpp @@ -1180,7 +1180,7 @@ namespace sol { struct is_environment : std::integral_constant::value || is_table::value> {}; template - struct is_automagical : std::true_type {}; + struct is_automagical : meta::neg>> {}; template inline type type_of() { diff --git a/sol/usertype_core.hpp b/sol/usertype_core.hpp index d084868c..c4e7751e 100644 --- a/sol/usertype_core.hpp +++ b/sol/usertype_core.hpp @@ -92,7 +92,7 @@ namespace sol { template int comparsion_operator_wrap(lua_State* L) { - auto maybel = stack::unqualified_check_get(L, 1); + auto maybel = stack::unqualified_check_get(L, 1); if (maybel) { auto mayber = stack::unqualified_check_get(L, 2); if (mayber) { diff --git a/tests/tests.cpp b/tests/tests.cpp index 4cd8801d..33f33df0 100644 --- a/tests/tests.cpp +++ b/tests/tests.cpp @@ -542,6 +542,27 @@ TEST_CASE("optional/left out args", "Make sure arguments can be left out of opti }()); } +TEST_CASE("optional/engaged versus unengaged", "solidify semantics for an engaged and unengaged optional") { + sol::state lua; + lua.open_libraries(sol::lib::base); + + lua.set_function("f", [](sol::optional optional_arg) { + if (optional_arg) { + return true; + } + return false; + }); + + auto valid0 = lua.safe_script("assert(not f())", sol::script_pass_on_error); + REQUIRE(valid0.valid()); + auto valid1 = lua.safe_script("assert(not f(nil))", sol::script_pass_on_error); + REQUIRE(valid1.valid()); + auto valid2 = lua.safe_script("assert(f(1))", sol::script_pass_on_error); + REQUIRE(valid2.valid()); + auto valid3 = lua.safe_script("assert(f('hi'))", sol::script_pass_on_error); + REQUIRE(valid3.valid()); +} + TEST_CASE("pusher/constness", "Make sure more types can handle being const and junk") { struct Foo { Foo(const sol::function& f) From 3935dc497c1caf33f2f2f6b25e66016fdd5c4a10 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Wed, 27 Jun 2018 07:14:02 -0400 Subject: [PATCH 05/15] fix #673 fix #670 --- single/sol/sol.hpp | 75 +++++++++++++++++-------------- single/sol/sol_forward.hpp | 4 +- sol/simple_usertype_metatable.hpp | 6 +-- sol/stack_core.hpp | 6 +++ sol/usertype_metatable.hpp | 29 +++++++++--- tests/test_simple_usertypes.cpp | 20 +++++++++ tests/test_usertypes.cpp | 20 +++++++++ 7 files changed, 116 insertions(+), 44 deletions(-) diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index 6b3452cf..2854b7f7 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-06-16 11:58:58.595822 UTC -// This header was generated with sol v2.20.3 (revision 968989b) +// Generated 2018-06-27 11:13:10.992580 UTC +// This header was generated with sol v2.20.3 (revision 301547f) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -5760,7 +5760,7 @@ namespace sol { struct is_environment : std::integral_constant::value || is_table::value> {}; template - struct is_automagical : std::true_type {}; + struct is_automagical : meta::neg>> {}; template inline type type_of() { @@ -7854,7 +7854,8 @@ namespace sol { template inline decltype(auto) unqualified_check_get(lua_State* L, int index, Handler&& handler, record& tracking) { - check_getter cg{}; + typedef meta::unqualified_t Tu; + check_getter cg{}; (void)cg; return cg.get(L, index, std::forward(handler), tracking); } @@ -7895,6 +7896,9 @@ namespace sol { #if defined(SOL_SAFE_GETTER) && SOL_SAFE_GETTER template inline auto tagged_unqualified_get(types, lua_State* L, int index, record& tracking) -> decltype(stack_detail::unchecked_unqualified_get(L, index, tracking)) { + if (is_lua_reference::value) { + return stack_detail::unchecked_unqualified_get(L, index, tracking); + } auto op = unqualified_check_get(L, index, type_panic_c_str, tracking); return *std::move(op); } @@ -7906,6 +7910,9 @@ namespace sol { template inline auto tagged_get(types, lua_State* L, int index, record& tracking) -> decltype(stack_detail::unchecked_get(L, index, tracking)) { + if (is_lua_reference::value) { + return stack_detail::unchecked_get(L, index, tracking); + } auto op = check_get(L, index, type_panic_c_str, tracking); return *std::move(op); } @@ -10087,7 +10094,7 @@ namespace stack { static optional get(lua_State* L, int index, Handler&& handler, record& tracking) { // actually check if it's none here, otherwise // we'll have a none object inside an optional! - bool success = stack::check(L, index, no_panic); + bool success = lua_isnoneornil(L, index) == 0 && stack::check(L, index, no_panic); if (!success) { // expected type, actual type tracking.use(static_cast(success)); @@ -10098,14 +10105,6 @@ namespace stack { } }; - template - struct check_getter> { - template - static decltype(auto) get(lua_State* L, int index, Handler&&, record& tracking) { - return check_get(L, index, no_panic, tracking); - } - }; - template struct check_getter::value && lua_type_of::value == type::number>> { template @@ -10231,18 +10230,7 @@ namespace stack { namespace sol { namespace stack { template - struct qualified_check_getter { - typedef decltype(stack_detail::unchecked_get(nullptr, 0, std::declval())) R; - - template - static optional get(lua_State* L, int index, Handler&& handler, record& tracking) { - if (!check(L, index, std::forward(handler))) { - tracking.use(static_cast(!lua_isnone(L, index))); - return nullopt; - } - return stack_detail::unchecked_get(L, index, tracking); - } - }; + struct qualified_check_getter : check_getter, C> {}; } } // namespace sol::stack @@ -18038,7 +18026,7 @@ namespace sol { template int comparsion_operator_wrap(lua_State* L) { - auto maybel = stack::unqualified_check_get(L, 1); + auto maybel = stack::unqualified_check_get(L, 1); if (maybel) { auto mayber = stack::unqualified_check_get(L, 2); if (mayber) { @@ -18434,7 +18422,7 @@ namespace sol { int runtime_new_index(lua_State* L, void*, int runtimetarget); template - inline int metatable_newindex(lua_State* L) { + inline int metatable_new_index(lua_State* L) { if (is_toplevel(L)) { auto non_indexable = [&L]() { if (is_simple) { @@ -18718,7 +18706,7 @@ namespace sol { template > usertype_metatable(Args&&... args) - : usertype_metatable_core(&usertype_detail::indexing_fail, &usertype_detail::metatable_newindex), usertype_detail::registrar(), functions(std::forward(args)...), destructfunc(nullptr), callconstructfunc(nullptr), indexbase(&core_indexing_call), newindexbase(&core_indexing_call), indexbaseclasspropogation(usertype_detail::walk_all_bases), newindexbaseclasspropogation(usertype_detail::walk_all_bases), baseclasscheck(nullptr), baseclasscast(nullptr), secondarymeta(contains_variable()), properties() { + : usertype_metatable_core(&usertype_detail::indexing_fail, &usertype_detail::metatable_new_index), usertype_detail::registrar(), functions(std::forward(args)...), destructfunc(nullptr), callconstructfunc(nullptr), indexbase(&core_indexing_call), newindexbase(&core_indexing_call), indexbaseclasspropogation(usertype_detail::walk_all_bases), newindexbaseclasspropogation(usertype_detail::walk_all_bases), baseclasscheck(nullptr), baseclasscast(nullptr), secondarymeta(contains_variable()), properties() { properties.reset(); std::initializer_list ilist{{std::pair(usertype_detail::make_string(std::get(functions)), usertype_detail::call_information(&usertype_metatable::real_find_call, @@ -18756,7 +18744,7 @@ namespace sol { return is_index ? f.indexfunc(L) : f.newindexfunc(L); } - template + template static int core_indexing_call(lua_State* L) { usertype_metatable& f = toplevel ? static_cast(stack::get>(L, upvalue_index(usertype_detail::metatable_index))) @@ -18795,6 +18783,9 @@ namespace sol { if (found) { return ret; } + if (is_meta_bound) { + return is_index ? usertype_detail::indexing_fail(L) : usertype_detail::metatable_new_index(L); + } return toplevel ? (is_index ? f.indexfunc(L) : f.newindexfunc(L)) : -1; } @@ -18806,6 +18797,14 @@ namespace sol { return core_indexing_call(L); } + static int real_meta_index_call(lua_State* L) { + return core_indexing_call(L); + } + + static int real_meta_new_index_call(lua_State* L) { + return core_indexing_call(L); + } + template static int real_call(lua_State* L) { usertype_metatable& f = stack::get>(L, upvalue_index(usertype_detail::metatable_index)); @@ -18842,6 +18841,14 @@ namespace sol { return detail::typed_static_trampoline(L); } + static int meta_index_call(lua_State* L) { + return detail::typed_static_trampoline(L); + } + + static int meta_new_index_call(lua_State* L) { + return detail::typed_static_trampoline(L); + } + virtual int push_um(lua_State* L) override { return stack::push(L, std::move(*this)); } @@ -18995,8 +19002,8 @@ namespace sol { stack::set_field(L, meta_function::call_function, make_closure(um.callconstructfunc, nullptr, make_light(um), make_light(umc)), metabehind.stack_index()); } - stack::set_field(L, meta_function::index, make_closure(umt_t::index_call, nullptr, make_light(um), make_light(umc), nullptr, usertype_detail::toplevel_magic), metabehind.stack_index()); - stack::set_field(L, meta_function::new_index, make_closure(umt_t::new_index_call, nullptr, make_light(um), make_light(umc), nullptr, usertype_detail::toplevel_magic), metabehind.stack_index()); + stack::set_field(L, meta_function::index, make_closure(umt_t::meta_index_call, nullptr, make_light(um), make_light(umc), nullptr, usertype_detail::toplevel_magic), metabehind.stack_index()); + stack::set_field(L, meta_function::new_index, make_closure(umt_t::meta_new_index_call, nullptr, make_light(um), make_light(umc), nullptr, usertype_detail::toplevel_magic), metabehind.stack_index()); stack::set_field(L, metatable_key, metabehind, t.stack_index()); metabehind.pop(); } @@ -19048,7 +19055,7 @@ namespace sol { else { return is_index ? indexing_fail(L) - : metatable_newindex(L); + : metatable_new_index(L); } } } @@ -19098,7 +19105,7 @@ namespace sol { else { return is_index ? indexing_fail(L) - : metatable_newindex(L); + : metatable_new_index(L); } } /* Check table storage first for a method that works @@ -19137,7 +19144,7 @@ namespace sol { else { return is_index ? indexing_fail(L) - : metatable_newindex(L); + : metatable_new_index(L); } } return -1; diff --git a/single/sol/sol_forward.hpp b/single/sol/sol_forward.hpp index f2674fc7..b35bb9fc 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-06-16 11:58:58.882218 UTC -// This header was generated with sol v2.20.3 (revision 968989b) +// Generated 2018-06-27 11:13:11.257646 UTC +// This header was generated with sol v2.20.3 (revision 301547f) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP diff --git a/sol/simple_usertype_metatable.hpp b/sol/simple_usertype_metatable.hpp index 377068ec..b720bd82 100644 --- a/sol/simple_usertype_metatable.hpp +++ b/sol/simple_usertype_metatable.hpp @@ -63,7 +63,7 @@ namespace sol { else { return is_index ? indexing_fail(L) - : metatable_newindex(L); + : metatable_new_index(L); } } } @@ -113,7 +113,7 @@ namespace sol { else { return is_index ? indexing_fail(L) - : metatable_newindex(L); + : metatable_new_index(L); } } /* Check table storage first for a method that works @@ -152,7 +152,7 @@ namespace sol { else { return is_index ? indexing_fail(L) - : metatable_newindex(L); + : metatable_new_index(L); } } return -1; diff --git a/sol/stack_core.hpp b/sol/stack_core.hpp index ea36cd38..92d34146 100644 --- a/sol/stack_core.hpp +++ b/sol/stack_core.hpp @@ -809,6 +809,9 @@ namespace sol { #if defined(SOL_SAFE_GETTER) && SOL_SAFE_GETTER template inline auto tagged_unqualified_get(types, lua_State* L, int index, record& tracking) -> decltype(stack_detail::unchecked_unqualified_get(L, index, tracking)) { + if (is_lua_reference::value) { + return stack_detail::unchecked_unqualified_get(L, index, tracking); + } auto op = unqualified_check_get(L, index, type_panic_c_str, tracking); return *std::move(op); } @@ -820,6 +823,9 @@ namespace sol { template inline auto tagged_get(types, lua_State* L, int index, record& tracking) -> decltype(stack_detail::unchecked_get(L, index, tracking)) { + if (is_lua_reference::value) { + return stack_detail::unchecked_get(L, index, tracking); + } auto op = check_get(L, index, type_panic_c_str, tracking); return *std::move(op); } diff --git a/sol/usertype_metatable.hpp b/sol/usertype_metatable.hpp index a5ee4e0a..a091f4f3 100644 --- a/sol/usertype_metatable.hpp +++ b/sol/usertype_metatable.hpp @@ -242,7 +242,7 @@ namespace sol { int runtime_new_index(lua_State* L, void*, int runtimetarget); template - inline int metatable_newindex(lua_State* L) { + inline int metatable_new_index(lua_State* L) { if (is_toplevel(L)) { auto non_indexable = [&L]() { if (is_simple) { @@ -526,7 +526,7 @@ namespace sol { template > usertype_metatable(Args&&... args) - : usertype_metatable_core(&usertype_detail::indexing_fail, &usertype_detail::metatable_newindex), usertype_detail::registrar(), functions(std::forward(args)...), destructfunc(nullptr), callconstructfunc(nullptr), indexbase(&core_indexing_call), newindexbase(&core_indexing_call), indexbaseclasspropogation(usertype_detail::walk_all_bases), newindexbaseclasspropogation(usertype_detail::walk_all_bases), baseclasscheck(nullptr), baseclasscast(nullptr), secondarymeta(contains_variable()), properties() { + : usertype_metatable_core(&usertype_detail::indexing_fail, &usertype_detail::metatable_new_index), usertype_detail::registrar(), functions(std::forward(args)...), destructfunc(nullptr), callconstructfunc(nullptr), indexbase(&core_indexing_call), newindexbase(&core_indexing_call), indexbaseclasspropogation(usertype_detail::walk_all_bases), newindexbaseclasspropogation(usertype_detail::walk_all_bases), baseclasscheck(nullptr), baseclasscast(nullptr), secondarymeta(contains_variable()), properties() { properties.reset(); std::initializer_list ilist{{std::pair(usertype_detail::make_string(std::get(functions)), usertype_detail::call_information(&usertype_metatable::real_find_call, @@ -564,7 +564,7 @@ namespace sol { return is_index ? f.indexfunc(L) : f.newindexfunc(L); } - template + template static int core_indexing_call(lua_State* L) { usertype_metatable& f = toplevel ? static_cast(stack::get>(L, upvalue_index(usertype_detail::metatable_index))) @@ -603,6 +603,9 @@ namespace sol { if (found) { return ret; } + if (is_meta_bound) { + return is_index ? usertype_detail::indexing_fail(L) : usertype_detail::metatable_new_index(L); + } return toplevel ? (is_index ? f.indexfunc(L) : f.newindexfunc(L)) : -1; } @@ -614,6 +617,14 @@ namespace sol { return core_indexing_call(L); } + static int real_meta_index_call(lua_State* L) { + return core_indexing_call(L); + } + + static int real_meta_new_index_call(lua_State* L) { + return core_indexing_call(L); + } + template static int real_call(lua_State* L) { usertype_metatable& f = stack::get>(L, upvalue_index(usertype_detail::metatable_index)); @@ -650,6 +661,14 @@ namespace sol { return detail::typed_static_trampoline(L); } + static int meta_index_call(lua_State* L) { + return detail::typed_static_trampoline(L); + } + + static int meta_new_index_call(lua_State* L) { + return detail::typed_static_trampoline(L); + } + virtual int push_um(lua_State* L) override { return stack::push(L, std::move(*this)); } @@ -803,8 +822,8 @@ namespace sol { stack::set_field(L, meta_function::call_function, make_closure(um.callconstructfunc, nullptr, make_light(um), make_light(umc)), metabehind.stack_index()); } - stack::set_field(L, meta_function::index, make_closure(umt_t::index_call, nullptr, make_light(um), make_light(umc), nullptr, usertype_detail::toplevel_magic), metabehind.stack_index()); - stack::set_field(L, meta_function::new_index, make_closure(umt_t::new_index_call, nullptr, make_light(um), make_light(umc), nullptr, usertype_detail::toplevel_magic), metabehind.stack_index()); + stack::set_field(L, meta_function::index, make_closure(umt_t::meta_index_call, nullptr, make_light(um), make_light(umc), nullptr, usertype_detail::toplevel_magic), metabehind.stack_index()); + stack::set_field(L, meta_function::new_index, make_closure(umt_t::meta_new_index_call, nullptr, make_light(um), make_light(umc), nullptr, usertype_detail::toplevel_magic), metabehind.stack_index()); stack::set_field(L, metatable_key, metabehind, t.stack_index()); metabehind.pop(); } diff --git a/tests/test_simple_usertypes.cpp b/tests/test_simple_usertypes.cpp index 6f8d6180..6a2f6634 100644 --- a/tests/test_simple_usertypes.cpp +++ b/tests/test_simple_usertypes.cpp @@ -759,6 +759,26 @@ TEST_CASE("simple_usertype/runtime replacement", "ensure that functions can be p } } +TEST_CASE("simple_usertype/runtime additions with newindex", "ensure that additions when new_index is overriden don't hit the specified new_index function") { + class newindex_object {}; + sol::state lua; + lua.open_libraries(sol::lib::base); + lua.new_simple_usertype("object", + sol::meta_function::new_index, [](newindex_object& o, sol::object key, sol::object value) { + return; + }); + + lua["object"]["test"] = [](newindex_object& o) { + std::cout << "test" << std::endl; + return 446; + }; + + auto result1 = lua.safe_script("o = object.new()", sol::script_pass_on_error); + REQUIRE(result1.valid()); + auto result2 = lua.safe_script("assert(o:test() == 446)", sol::script_pass_on_error); + REQUIRE(result2.valid()); +} + TEST_CASE("simple_usertype/meta key retrievals", "allow for special meta keys (__index, __newindex) to trigger methods even if overwritten directly") { SECTION("dynamically") { static int writes = 0; diff --git a/tests/test_usertypes.cpp b/tests/test_usertypes.cpp index 4135235d..a39387e9 100644 --- a/tests/test_usertypes.cpp +++ b/tests/test_usertypes.cpp @@ -1801,6 +1801,26 @@ TEST_CASE("usertype/runtime-replacement", "ensure that functions can be properly } } +TEST_CASE("usertype/runtime additions with newindex", "ensure that additions when new_index is overriden don't hit the specified new_index function") { + class newindex_object {}; + sol::state lua; + lua.open_libraries(sol::lib::base); + lua.new_usertype("object", + sol::meta_function::new_index, [](newindex_object& o, sol::object key, sol::object value) { + return; + }); + + lua["object"]["test"] = [](newindex_object& o) { + std::cout << "test" << std::endl; + return 446; + }; + + auto result1 = lua.safe_script("o = object.new()", sol::script_pass_on_error); + REQUIRE(result1.valid()); + auto result2 = lua.safe_script("assert(o:test() == 446)", sol::script_pass_on_error); + REQUIRE(result2.valid()); +} + TEST_CASE("usertype/alignment", "ensure that alignment does not trigger weird aliasing issues") { struct aligned_base {}; struct aligned_derived : aligned_base {}; From 60ee53a429b72a2afe1af2e3e2d0a137b041cf46 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Wed, 27 Jun 2018 07:15:56 -0400 Subject: [PATCH 06/15] update single --- 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 2854b7f7..8bcaf8b5 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-06-27 11:13:10.992580 UTC -// This header was generated with sol v2.20.3 (revision 301547f) +// Generated 2018-06-27 11:15:40.545352 UTC +// This header was generated with sol v2.20.4 (revision 3935dc4) // 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 b35bb9fc..0318b20e 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-06-27 11:13:11.257646 UTC -// This header was generated with sol v2.20.3 (revision 301547f) +// Generated 2018-06-27 11:15:40.807656 UTC +// This header was generated with sol v2.20.4 (revision 3935dc4) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP From 254466eb4b3ae630c731a557987f3adb1a8f86b0 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Wed, 27 Jun 2018 11:34:40 -0400 Subject: [PATCH 07/15] add `pointer()` method --- single/sol/sol.hpp | 34 ++++++++++++++++++++++++++++++++-- single/sol/sol_forward.hpp | 4 ++-- sol/reference.hpp | 6 ++++++ sol/stack_get_unqualified.hpp | 8 ++++++++ sol/stack_push.hpp | 8 ++++++++ sol/stack_reference.hpp | 5 +++++ sol/types.hpp | 3 +++ tests/test_utility.cpp | 21 +++++++++++++++++++++ 8 files changed, 85 insertions(+), 4 deletions(-) diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index 8bcaf8b5..17353016 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-06-27 11:15:40.545352 UTC -// This header was generated with sol v2.20.4 (revision 3935dc4) +// Generated 2018-06-27 15:33:51.932186 UTC +// This header was generated with sol v2.20.4 (revision 60ee53a) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -5530,6 +5530,9 @@ namespace sol { template <> struct lua_type_of : std::integral_constant {}; + template <> + struct lua_type_of : std::integral_constant {}; + template <> struct lua_type_of : std::integral_constant {}; @@ -6513,6 +6516,11 @@ namespace sol { return index; } + const void* pointer() const noexcept { + const void* vp = lua_topointer(lua_state(), stack_index()); + return vp; + } + type get_type() const noexcept { int result = lua_type(lua_state(), index); return static_cast(result); @@ -6957,6 +6965,12 @@ namespace sol { return !(ref == LUA_NOREF || ref == LUA_REFNIL); } + const void* pointer() const noexcept { + int si = push(); + const void* vp = lua_topointer(lua_state(), -si); + return vp; + } + explicit operator bool() const noexcept { return valid(); } @@ -9843,6 +9857,14 @@ namespace stack { } }; + template <> + struct getter { + static const void* get(lua_State* L, int index, record& tracking) { + tracking.use(1); + return lua_touserdata(L, index); + } + }; + template struct getter> { static T* get_no_lua_nil(lua_State* L, int index, record& tracking) { @@ -10673,6 +10695,14 @@ namespace stack { } }; + template <> + struct pusher { + static int push(lua_State* L, const void* userdata) { + lua_pushlightuserdata(L, const_cast(userdata)); + return 1; + } + }; + template <> struct pusher { static int push(lua_State* L, lightuserdata_value userdata) { diff --git a/single/sol/sol_forward.hpp b/single/sol/sol_forward.hpp index 0318b20e..fe2766a1 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-06-27 11:15:40.807656 UTC -// This header was generated with sol v2.20.4 (revision 3935dc4) +// Generated 2018-06-27 15:33:52.214419 UTC +// This header was generated with sol v2.20.4 (revision 60ee53a) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP diff --git a/sol/reference.hpp b/sol/reference.hpp index 8fc35ead..0693a434 100644 --- a/sol/reference.hpp +++ b/sol/reference.hpp @@ -429,6 +429,12 @@ namespace sol { return !(ref == LUA_NOREF || ref == LUA_REFNIL); } + const void* pointer() const noexcept { + int si = push(); + const void* vp = lua_topointer(lua_state(), -si); + return vp; + } + explicit operator bool() const noexcept { return valid(); } diff --git a/sol/stack_get_unqualified.hpp b/sol/stack_get_unqualified.hpp index aa279d60..1d388220 100644 --- a/sol/stack_get_unqualified.hpp +++ b/sol/stack_get_unqualified.hpp @@ -739,6 +739,14 @@ namespace stack { } }; + template <> + struct getter { + static const void* get(lua_State* L, int index, record& tracking) { + tracking.use(1); + return lua_touserdata(L, index); + } + }; + template struct getter> { static T* get_no_lua_nil(lua_State* L, int index, record& tracking) { diff --git a/sol/stack_push.hpp b/sol/stack_push.hpp index d452d435..1e74ea24 100644 --- a/sol/stack_push.hpp +++ b/sol/stack_push.hpp @@ -469,6 +469,14 @@ namespace stack { } }; + template <> + struct pusher { + static int push(lua_State* L, const void* userdata) { + lua_pushlightuserdata(L, const_cast(userdata)); + return 1; + } + }; + template <> struct pusher { static int push(lua_State* L, lightuserdata_value userdata) { diff --git a/sol/stack_reference.hpp b/sol/stack_reference.hpp index 16a22836..7fdb7da6 100644 --- a/sol/stack_reference.hpp +++ b/sol/stack_reference.hpp @@ -113,6 +113,11 @@ namespace sol { return index; } + const void* pointer() const noexcept { + const void* vp = lua_topointer(lua_state(), stack_index()); + return vp; + } + type get_type() const noexcept { int result = lua_type(lua_state(), index); return static_cast(result); diff --git a/sol/types.hpp b/sol/types.hpp index e06ffba3..8357fa55 100644 --- a/sol/types.hpp +++ b/sol/types.hpp @@ -950,6 +950,9 @@ namespace sol { template <> struct lua_type_of : std::integral_constant {}; + template <> + struct lua_type_of : std::integral_constant {}; + template <> struct lua_type_of : std::integral_constant {}; diff --git a/tests/test_utility.cpp b/tests/test_utility.cpp index 438c2502..6bae2e04 100644 --- a/tests/test_utility.cpp +++ b/tests/test_utility.cpp @@ -134,6 +134,27 @@ TEST_CASE("utility/thread", "fire up lots of threads at the same time to make su }()); } +TEST_CASE("utility/pointer", "check we can get pointer value from references") { + sol::state lua; + lua.set_function("f", [](bool aorb, sol::reference a, sol::stack_reference b) { + if (aorb) { + return a.pointer(); + } + return b.pointer(); + }); + auto result0 = lua.safe_script("v0 = 'hi'", sol::script_pass_on_error); + REQUIRE(result0.valid()); + auto result1 = lua.safe_script("v1 = f(true, v0)", sol::script_pass_on_error); + REQUIRE(result1.valid()); + auto result2 = lua.safe_script("v2 = f(false, nil, v0)", sol::script_pass_on_error); + REQUIRE(result2.valid()); + const void* ap = lua["v1"]; + const void* bp = lua["v2"]; + REQUIRE(ap != nullptr); + REQUIRE(bp != nullptr); + REQUIRE(ap == bp); +} + TEST_CASE("utility/this_state", "Ensure this_state argument can be gotten anywhere in the function.") { struct bark { int with_state(sol::this_state l, int a, int b) { From 89dbc160ab3dee961be78b00045e2732d06171a7 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Wed, 27 Jun 2018 16:16:24 -0400 Subject: [PATCH 08/15] fix utility stuff --- tests/test_utility.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/test_utility.cpp b/tests/test_utility.cpp index 6bae2e04..dbd6372b 100644 --- a/tests/test_utility.cpp +++ b/tests/test_utility.cpp @@ -150,8 +150,6 @@ TEST_CASE("utility/pointer", "check we can get pointer value from references") { REQUIRE(result2.valid()); const void* ap = lua["v1"]; const void* bp = lua["v2"]; - REQUIRE(ap != nullptr); - REQUIRE(bp != nullptr); REQUIRE(ap == bp); } From 8894f0db806926d186932c8beed5994b4c93fe3c Mon Sep 17 00:00:00 2001 From: NullCascade Date: Sat, 30 Jun 2018 10:14:50 -0700 Subject: [PATCH 09/15] Fix a few typos in the threading doc. --- docs/source/threading.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/threading.rst b/docs/source/threading.rst index 4b898fdd..fde5c3b1 100644 --- a/docs/source/threading.rst +++ b/docs/source/threading.rst @@ -1,13 +1,13 @@ threading ========= -Lua has no thread safety. sol does not force thread safety bottlenecks anywhere. Tr(eat access and object handling like you were dealing with a raw ``int`` reference (``int&``) (no safety or order guarantees whatsoever). +Lua has no thread safety. sol does not force thread safety bottlenecks anywhere. Treat access and object handling like you were dealing with a raw ``int`` reference (``int&``) (no safety or order guarantees whatsoever). Assume any access or any call on Lua affects the whole ``sol::state``/``lua_State*`` (because it does, in a fair bit of cases). Therefore, every call to a state should be blocked off in C++ with some kind of access control (when you're working with multiple C++ threads). When you start hitting the same state from multiple threads, race conditions (data or instruction) can happen. -Individual Lua coroutines might be able to run on separate C++-created threads without tanking the state utterly, since each Lua coroutine has the capability to run on an independent Lua execution stack (Lua confusingly calls it a ``thread`` in the C API, but it really just means a seperate execution stack) as well as some other associated bits and pieces that won't quite interfere with the global state. +Individual Lua coroutines might be able to run on separate C++-created threads without tanking the state utterly, since each Lua coroutine has the capability to run on an independent Lua execution stack (Lua confusingly calls it a ``thread`` in the C API, but it really just means a separate execution stack) as well as some other associated bits and pieces that won't quite interfere with the global state. -To handle multithreaded environments, it is encouraged to either spawn a Lua state (``sol::state``) for each thread you are working with and keep inter-state communication to synchronized serialization points. This means that 3 C++ threads should each have their own Lua state, and access between them should be controlled using some kind of synchronied C++ mechanism (actual transfer between states must be done by serializing the value into C++ and then re-pushing it into the other state). +To handle multithreaded environments, it is encouraged to either spawn a Lua state (``sol::state``) for each thread you are working with and keep inter-state communication to synchronized serialization points. This means that 3 C++ threads should each have their own Lua state, and access between them should be controlled using some kind of synchronized C++ mechanism (actual transfer between states must be done by serializing the value into C++ and then re-pushing it into the other state). Using coroutines and Lua's threads might also buy you some concurrency and parallelism (**unconfirmed and likely untrue, do not gamble on this**), but remember that Lua's 'threading' technique is ultimately cooperative and requires explicit yielding and resuming (simplified as function calls for :doc:`sol::coroutine`). From 4c7a8663b54ec728e0ca87013ae1024c3b01843c Mon Sep 17 00:00:00 2001 From: Orfeas Zafeiris Date: Mon, 23 Jul 2018 17:50:50 +0300 Subject: [PATCH 10/15] Fix size trait detection for containers --- sol/container_traits.hpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/sol/container_traits.hpp b/sol/container_traits.hpp index 665a3274..09332c72 100644 --- a/sol/container_traits.hpp +++ b/sol/container_traits.hpp @@ -340,6 +340,21 @@ namespace sol { static const bool value = sizeof(test(0)) == sizeof(char); }; + template + struct has_traits_size_test { + private: + typedef std::array one; + typedef std::array two; + + template + static one test(decltype(&C::size)); + template + static two test(...); + + public: + static const bool value = sizeof(test(0)) == sizeof(char); + }; + template using has_clear = meta::boolean::value>; @@ -383,7 +398,7 @@ namespace sol { using has_traits_add = meta::boolean::value>; template - using has_traits_size = meta::has_size; + using has_traits_size = meta::boolean::value>; template using has_traits_clear = has_clear; From d34326492ae707470ae506834ea8c1515087ed14 Mon Sep 17 00:00:00 2001 From: Orfeas Zafeiris Date: Mon, 23 Jul 2018 17:58:27 +0300 Subject: [PATCH 11/15] Fix default args on single generation script --- single.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/single.py b/single.py index bd8cad79..df63616f 100644 --- a/single.py +++ b/single.py @@ -23,7 +23,7 @@ parser.add_argument( help= 'name and location of where to place file (and forward declaration file)', metavar='file', - default='sol.hpp') + default=['sol.hpp']) parser.add_argument('--quiet', help='suppress all output', action='store_true') args = parser.parse_args() From 7181a179c8bac1ce3ae4b7d2edf8502e05a1c0d0 Mon Sep 17 00:00:00 2001 From: Orfeas Zafeiris Date: Mon, 23 Jul 2018 17:59:17 +0300 Subject: [PATCH 12/15] Update single --- single/sol/sol.hpp | 21 ++++++++++++++++++--- single/sol/sol_forward.hpp | 4 ++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index 17353016..8ca6296d 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-06-27 15:33:51.932186 UTC -// This header was generated with sol v2.20.4 (revision 60ee53a) +// Generated 2018-07-23 14:58:57.359452 UTC +// This header was generated with sol v2.20.4 (revision d343264) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -16450,6 +16450,21 @@ namespace sol { static const bool value = sizeof(test(0)) == sizeof(char); }; + template + struct has_traits_size_test { + private: + typedef std::array one; + typedef std::array two; + + template + static one test(decltype(&C::size)); + template + static two test(...); + + public: + static const bool value = sizeof(test(0)) == sizeof(char); + }; + template using has_clear = meta::boolean::value>; @@ -16493,7 +16508,7 @@ namespace sol { using has_traits_add = meta::boolean::value>; template - using has_traits_size = meta::has_size; + using has_traits_size = meta::boolean::value>; template using has_traits_clear = has_clear; diff --git a/single/sol/sol_forward.hpp b/single/sol/sol_forward.hpp index fe2766a1..921609c0 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-06-27 15:33:52.214419 UTC -// This header was generated with sol v2.20.4 (revision 60ee53a) +// Generated 2018-07-23 14:58:57.506417 UTC +// This header was generated with sol v2.20.4 (revision d343264) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP From 71847ff64ae539a2ef51c7503a26e5f6a58039b0 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Sun, 29 Jul 2018 13:11:21 -0400 Subject: [PATCH 13/15] some traits changes --- sol/raii.hpp | 2 +- sol/traits.hpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sol/raii.hpp b/sol/raii.hpp index 22573163..431e45e8 100644 --- a/sol/raii.hpp +++ b/sol/raii.hpp @@ -35,7 +35,7 @@ namespace sol { static void construct(T&& obj, Args&&... args) { typedef meta::unqualified_t Tu; std::allocator alloc{}; - std::allocator_traits>::construct(alloc, obj, std::forward(args)...); + std::allocator_traits>::construct(alloc, std::forward(obj), std::forward(args)...); } template diff --git a/sol/traits.hpp b/sol/traits.hpp index 491ac567..8be999fb 100644 --- a/sol/traits.hpp +++ b/sol/traits.hpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include From d01d49aa7e44e74a661340ed9b0c0f53c86a4b91 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Sun, 29 Jul 2018 13:21:32 -0400 Subject: [PATCH 14/15] update single --- single/sol/sol.hpp | 9 ++++----- single/sol/sol_forward.hpp | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index 8ca6296d..b7a925ba 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-23 14:58:57.359452 UTC -// This header was generated with sol v2.20.4 (revision d343264) +// Generated 2018-07-29 17:21:21.230864 UTC +// This header was generated with sol v2.20.4 (revision 71847ff) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -1196,6 +1196,7 @@ namespace sol { #include #include #include +#include #include #include @@ -4437,7 +4438,7 @@ namespace sol { static void construct(T&& obj, Args&&... args) { typedef meta::unqualified_t Tu; std::allocator alloc{}; - std::allocator_traits>::construct(alloc, obj, std::forward(args)...); + std::allocator_traits>::construct(alloc, std::forward(obj), std::forward(args)...); } template @@ -4553,8 +4554,6 @@ namespace sol { // beginning of sol/filters.hpp -#include - namespace sol { namespace detail { struct filter_base_tag {}; diff --git a/single/sol/sol_forward.hpp b/single/sol/sol_forward.hpp index 921609c0..343f8818 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-23 14:58:57.506417 UTC -// This header was generated with sol v2.20.4 (revision d343264) +// Generated 2018-07-29 17:21:21.574860 UTC +// This header was generated with sol v2.20.4 (revision 71847ff) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP From 6638b300ccc26696afbee03a8fa08f2ddfe80d85 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Sun, 29 Jul 2018 14:05:40 -0400 Subject: [PATCH 15/15] Update single and tag --- 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 b7a925ba..6df2a179 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 17:21:21.230864 UTC -// This header was generated with sol v2.20.4 (revision 71847ff) +// Generated 2018-07-29 18:04:21.688310 UTC +// This header was generated with sol v2.20.4 (revision d01d49a) // 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 343f8818..f60623ef 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 17:21:21.574860 UTC -// This header was generated with sol v2.20.4 (revision 71847ff) +// Generated 2018-07-29 18:04:22.074805 UTC +// This header was generated with sol v2.20.4 (revision d01d49a) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP