diff --git a/sol/object.hpp b/sol/object.hpp index d6d4b206..a0d637e9 100644 --- a/sol/object.hpp +++ b/sol/object.hpp @@ -33,24 +33,24 @@ class basic_object : public base_t { private: template decltype(auto) as_stack(std::true_type) const { - return stack::get(lua_state(), base_t::stack_index()); + return stack::get(base_t::lua_state(), base_t::stack_index()); } template decltype(auto) as_stack(std::false_type) const { base_t::push(); - return stack::pop(lua_state()); + return stack::pop(base_t::lua_state()); } template bool is_stack(std::true_type) const { - return stack::check(lua_state(), base_t::stack_index(), no_panic); + return stack::check(base_t::lua_state(), base_t::stack_index(), no_panic); } template bool is_stack(std::false_type) const { auto pp = stack::push_pop(*this); - return stack::check(lua_state(), -1, no_panic); + return stack::check(base_t::lua_state(), -1, no_panic); } public: