2020// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2121
2222// This file was generated with a script.
23- // Generated 2019-09-01 06:26:40.339961 UTC
24- // This header was generated with sol v3.0.3 (revision e8649d2 )
23+ // Generated 2019-09-08 23:53:47.830273 UTC
24+ // This header was generated with sol v3.0.3 (revision 29c03ea )
2525// https://github.com/ThePhD/sol2
2626
2727#ifndef SOL_SINGLE_INCLUDE_HPP
@@ -23009,8 +23009,9 @@ namespace sol {
2300923009 basic_table_core(lua_State* L, T&& r) : base_t(L, std::forward<T>(r)) {
2301023010#if defined(SOL_SAFE_REFERENCES) && SOL_SAFE_REFERENCES
2301123011 auto pp = stack::push_pop(*this);
23012+ int table_index = pp.index_of(*this);
2301223013 constructor_handler handler{};
23013- stack::check<basic_table_core>(lua_state(), -1 , handler);
23014+ stack::check<basic_table_core>(lua_state(), table_index , handler);
2301423015#endif // Safety
2301523016 }
2301623017 basic_table_core(lua_State* L, const new_table& nt) : base_t(L, -stack::push(L, nt)) {
@@ -23027,8 +23028,9 @@ namespace sol {
2302723028 basic_table_core(lua_State* L, ref_index index) : basic_table_core(detail::no_safety, L, index) {
2302823029#if defined(SOL_SAFE_REFERENCES) && SOL_SAFE_REFERENCES
2302923030 auto pp = stack::push_pop(*this);
23031+ int table_index = pp.index_of(*this);
2303023032 constructor_handler handler{};
23031- stack::check<basic_table_core>(lua_state(), -1 , handler);
23033+ stack::check<basic_table_core>(lua_state(), table_index , handler);
2303223034#endif // Safety
2303323035 }
2303423036 template <typename T,
@@ -23038,8 +23040,9 @@ namespace sol {
2303823040#if defined(SOL_SAFE_REFERENCES) && SOL_SAFE_REFERENCES
2303923041 if (!is_table<meta::unqualified_t<T>>::value) {
2304023042 auto pp = stack::push_pop(*this);
23043+ int table_index = pp.index_of(*this);
2304123044 constructor_handler handler{};
23042- stack::check<basic_table_core>(lua_state(), -1 , handler);
23045+ stack::check<basic_table_core>(lua_state(), table_index , handler);
2304323046 }
2304423047#endif // Safety
2304523048 }
@@ -23226,8 +23229,9 @@ namespace sol {
2322623229 lua_State* L = base_t::lua_state();
2322723230 if constexpr (std::is_invocable_v<Fx, Key, Value>) {
2322823231 auto pp = stack::push_pop(*this);
23232+ int table_index = pp.index_of(*this);
2322923233 stack::push(L, lua_nil);
23230- while (lua_next(L, -2 )) {
23234+ while (lua_next(L, table_index )) {
2323123235 Key key(L, -2);
2323223236 Value value(L, -1);
2323323237 auto pn = stack::pop_n(L, 1);
@@ -23236,8 +23240,9 @@ namespace sol {
2323623240 }
2323723241 else {
2323823242 auto pp = stack::push_pop(*this);
23243+ int table_index = pp.index_of(*this);
2323923244 stack::push(L, lua_nil);
23240- while (lua_next(L, -2 )) {
23245+ while (lua_next(L, table_index )) {
2324123246 Key key(L, -2);
2324223247 Value value(L, -1);
2324323248 auto pn = stack::pop_n(L, 1);
@@ -23249,8 +23254,9 @@ namespace sol {
2324923254
2325023255 size_t size() const {
2325123256 auto pp = stack::push_pop(*this);
23257+ int table_index = pp.index_of(*this);
2325223258 lua_State* L = base_t::lua_state();
23253- lua_len(L, -1 );
23259+ lua_len(L, table_index );
2325423260 return stack::pop<size_t>(L);
2325523261 }
2325623262
0 commit comments