|
20 | 20 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
21 | 21 |
|
22 | 22 | // This file was generated with a script. |
23 | | -// Generated 2019-05-27 05:35:29.780976 UTC |
24 | | -// This header was generated with sol v3.0.2 (revision e814868) |
| 23 | +// Generated 2019-05-29 20:53:04.799735 UTC |
| 24 | +// This header was generated with sol v3.0.2 (revision 46a2b01) |
25 | 25 | // https://github.com/ThePhD/sol2 |
26 | 26 |
|
27 | 27 | #ifndef SOL_SINGLE_INCLUDE_HPP |
@@ -9682,14 +9682,18 @@ namespace sol { |
9682 | 9682 | } |
9683 | 9683 |
|
9684 | 9684 | struct properties_enrollment_allowed { |
| 9685 | + int& times_through; |
9685 | 9686 | std::bitset<64>& properties; |
9686 | 9687 | automagic_enrollments& enrollments; |
9687 | 9688 |
|
9688 | | - properties_enrollment_allowed(std::bitset<64>& props, automagic_enrollments& enroll) : properties(props), enrollments(enroll) { |
| 9689 | + properties_enrollment_allowed(int& times, std::bitset<64>& props, automagic_enrollments& enroll) : times_through(times), properties(props), enrollments(enroll) { |
9689 | 9690 | } |
9690 | 9691 |
|
9691 | 9692 | bool operator()(meta_function mf) const { |
9692 | 9693 | bool p = properties[static_cast<int>(mf)]; |
| 9694 | + if (times_through > 0) { |
| 9695 | + return p; |
| 9696 | + } |
9693 | 9697 | switch (mf) { |
9694 | 9698 | case meta_function::length: |
9695 | 9699 | return enrollments.length_operator && !p; |
@@ -11686,8 +11690,7 @@ namespace sol { namespace stack { |
11686 | 11690 | static decltype(auto) get(lua_State* L, int index, record& tracking) { |
11687 | 11691 | using Tu = meta::unqualified_t<X>; |
11688 | 11692 | static constexpr bool is_userdata_of_some_kind |
11689 | | - = !std::is_reference_v< |
11690 | | - X> && is_container_v<Tu> && std::is_default_constructible_v<Tu> && !is_lua_primitive_v<Tu> && !is_transparent_argument_v<Tu>; |
| 11693 | + = !std::is_reference_v<X> && is_container_v<Tu> && std::is_default_constructible_v<Tu> && !is_lua_primitive_v<Tu> && !is_transparent_argument_v<Tu>; |
11691 | 11694 | if constexpr (is_userdata_of_some_kind) { |
11692 | 11695 | if (type_of(L, index) == type::userdata) { |
11693 | 11696 | return static_cast<Tu>(stack_detail::unchecked_unqualified_get<Tu>(L, index, tracking)); |
@@ -21676,7 +21679,7 @@ namespace sol { namespace u_detail { |
21676 | 21679 | // add intrinsics |
21677 | 21680 | // this one is the actual meta-handling table, |
21678 | 21681 | // the next one will be the one for |
21679 | | - |
| 21682 | + int for_each_backing_metatable_calls = 0; |
21680 | 21683 | auto for_each_backing_metatable = [&](lua_State* L, submetatable_type smt, reference& fast_index_table) { |
21681 | 21684 | // Pointer types, AKA "references" from C++ |
21682 | 21685 | const char* metakey = nullptr; |
@@ -21750,8 +21753,8 @@ namespace sol { namespace u_detail { |
21750 | 21753 | stack::set_field<false, true>(L, detail::base_class_check_key(), reinterpret_cast<void*>(&detail::inheritance<T>::type_check), t.stack_index()); |
21751 | 21754 | stack::set_field<false, true>(L, detail::base_class_cast_key(), reinterpret_cast<void*>(&detail::inheritance<T>::type_cast), t.stack_index()); |
21752 | 21755 |
|
21753 | | - auto prop_fx = detail::properties_enrollment_allowed(storage.properties, enrollments); |
21754 | | - auto insert_fx = [&L, &t, &storage](meta_function mf, lua_CFunction reg) { |
| 21756 | + auto prop_fx = detail::properties_enrollment_allowed(for_each_backing_metatable_calls, storage.properties, enrollments); |
| 21757 | + auto insert_fx = [&L, &t, &storage, &smt](meta_function mf, lua_CFunction reg) { |
21755 | 21758 | stack::set_field<false, true>(L, mf, reg, t.stack_index()); |
21756 | 21759 | storage.properties[static_cast<int>(mf)] = true; |
21757 | 21760 | }; |
@@ -21793,6 +21796,7 @@ namespace sol { namespace u_detail { |
21793 | 21796 | storage.is_using_new_index = true; |
21794 | 21797 | } |
21795 | 21798 |
|
| 21799 | + ++for_each_backing_metatable_calls; |
21796 | 21800 | fast_index_table = reference(L, t); |
21797 | 21801 | t.pop(); |
21798 | 21802 | }; |
|
0 commit comments