From 515fabb5dee1f377c5a9b0691332ab43438759dd Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 17 Nov 2003 17:34:52 +0000 Subject: [PATCH] applied patch from Rene Rivera to make it compile in Metrowerks 8.x --- luabind/detail/class_rep.hpp | 6 ++++-- luabind/detail/get_signature.hpp | 2 +- src/class_rep.cpp | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/luabind/detail/class_rep.hpp b/luabind/detail/class_rep.hpp index 4fcfd37..6a87562 100644 --- a/luabind/detail/class_rep.hpp +++ b/luabind/detail/class_rep.hpp @@ -170,8 +170,10 @@ namespace luabind { namespace detail inline void(*destructor() const)(void*) { return m_destructor; } inline void(*const_holder_destructor() const)(void*) { return m_const_holder_destructor; } - inline void*(*extractor() const)(void*) { return m_extractor; } - inline const void*(*const_extractor() const)(void*) { return m_const_extractor; } + typedef const void*(*t_const_extractor)(void*); + inline t_const_extractor const_extractor() const { return m_const_extractor; } + typedef void*(*t_extractor)(void*); + inline t_extractor extractor() const { return m_extractor; } inline void(*const_converter() const)(void*,void*) { return m_const_converter; } diff --git a/luabind/detail/get_signature.hpp b/luabind/detail/get_signature.hpp index 8f168b5..7668f61 100644 --- a/luabind/detail/get_signature.hpp +++ b/luabind/detail/get_signature.hpp @@ -75,7 +75,7 @@ namespace luabind { namespace detail }; template - std::string name_of_type(by_value, lua_State* L, int) { return get_class_name(L, LUABIND_TYPEID(T)); }; + std::string name_of_type(by_value, lua_State* L, int) { return luabind::detail::get_class_name(L, LUABIND_TYPEID(T)); }; template std::string name_of_type(by_reference, lua_State* L, int) { return name_of_type(LUABIND_DECORATE_TYPE(T), L, 0L) + "&"; }; template diff --git a/src/class_rep.cpp b/src/class_rep.cpp index ea6f359..5c23ded 100755 --- a/src/class_rep.cpp +++ b/src/class_rep.cpp @@ -174,7 +174,7 @@ int luabind::detail::class_rep::gettable(lua_State* L) const char* key = lua_tostring(L, 2); // special case to see if this is a null-pointer - if (key && !strcmp(key, "__ok")) + if (key && !std::strcmp(key, "__ok")) { class_rep* crep = obj->crep(); @@ -1233,7 +1233,7 @@ void luabind::detail::class_rep::add_static_constant(const char* name, int val) // a method that is not present in this class (but in a subclass) const char* key = lua_tostring(L, 2); - if (key && !strcmp(key, "__ok")) + if (key && !std::strcmp(key, "__ok")) { class_rep* crep = obj->crep(); -- 2.11.4.GIT