From c59fc9e5364d11e8c0170884cb434d545c8b4448 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sat, 14 Dec 2013 00:05:14 -0500 Subject: [PATCH] Fix bug with sol::object not being copyable --- sol/function.hpp | 2 +- sol/object.hpp | 6 +++--- sol/table.hpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sol/function.hpp b/sol/function.hpp index 6a68d728..2707e97b 100644 --- a/sol/function.hpp +++ b/sol/function.hpp @@ -27,7 +27,7 @@ #include "stack.hpp" namespace sol { -class function : virtual public reference { +class function : public reference { private: void luacall (std::size_t argcount, std::size_t resultcount) { lua_call(state(), static_cast(argcount), static_cast(resultcount)); diff --git a/sol/object.hpp b/sol/object.hpp index 0bb7dde2..db374fd2 100644 --- a/sol/object.hpp +++ b/sol/object.hpp @@ -22,11 +22,11 @@ #ifndef SOL_OBJECT_HPP #define SOL_OBJECT_HPP -#include "table.hpp" -#include "function.hpp" +#include "reference.hpp" +#include "stack.hpp" namespace sol { -class object : public table, public function { +class object : public reference { public: object(lua_State* L, int index = -1): reference(L, index) {} object() = default; diff --git a/sol/table.hpp b/sol/table.hpp index dcc5a10b..2496517a 100644 --- a/sol/table.hpp +++ b/sol/table.hpp @@ -40,7 +40,7 @@ T* get_ptr(T* val) { } } // detail -class table : virtual public reference { +class table : public reference { template struct proxy; public: table() noexcept : reference() {}