From 33dbb406754f1aff8d2558a8203d9387f7e5a636 Mon Sep 17 00:00:00 2001 From: Daniel Wallin Date: Mon, 7 Dec 2009 15:34:06 +0100 Subject: [PATCH] Kill old detail::is_class_object() function. This was replaced by detail::get_instance(). --- luabind/detail/object_rep.hpp | 16 ---------------- src/class_info.cpp | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/luabind/detail/object_rep.hpp b/luabind/detail/object_rep.hpp index adf2a55..243aae5 100644 --- a/luabind/detail/object_rep.hpp +++ b/luabind/detail/object_rep.hpp @@ -122,22 +122,6 @@ namespace luabind { namespace detail } }; - - inline object_rep* is_class_object(lua_State* L, int index) - { - object_rep* obj = static_cast(lua_touserdata(L, index)); - if (!obj) return 0; - if (lua_getmetatable(L, index) == 0) return 0; - - lua_pushstring(L, "__luabind_class"); - lua_gettable(L, -2); - bool confirmation = lua_toboolean(L, -1) != 0; - lua_pop(L, 2); - if (!confirmation) return 0; - return obj; - - } - LUABIND_API object_rep* get_instance(lua_State* L, int index); LUABIND_API void push_instance_metatable(lua_State* L); LUABIND_API object_rep* push_new_instance(lua_State* L, class_rep* cls); diff --git a/src/class_info.cpp b/src/class_info.cpp index fea4e1c..531f6e0 100755 --- a/src/class_info.cpp +++ b/src/class_info.cpp @@ -35,7 +35,7 @@ namespace luabind lua_State* L = o.interpreter(); o.push(L); - detail::object_rep* obj = detail::is_class_object(L, -1); + detail::object_rep* obj = detail::get_instance(L, -1); if (!obj) { -- 2.11.4.GIT