From 2927e38cb46d3aa2cf278238d2a585d96f669d91 Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Fri, 19 Nov 2010 17:56:10 -0200 Subject: namespace Shiboken::BaseType renamed to Shiboken::ObjectType. --- libshiboken/basewrapper.cpp | 10 +++++----- libshiboken/basewrapper.h | 2 +- libshiboken/conversions.h | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'libshiboken') diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp index 5c47a357f..948a24e34 100644 --- a/libshiboken/basewrapper.cpp +++ b/libshiboken/basewrapper.cpp @@ -437,7 +437,7 @@ static void decRefPyObjectList(const std::list& lst) } } -namespace BaseType +namespace ObjectType { bool checkType(PyTypeObject* type) @@ -447,7 +447,7 @@ bool checkType(PyTypeObject* type) bool isUserType(PyTypeObject* type) { - return BaseType::checkType(type) && reinterpret_cast(type)->d->is_user_type; + return checkType(type) && reinterpret_cast(type)->d->is_user_type; } bool canCallConstructor(PyTypeObject* myType, PyTypeObject* ctorType) @@ -561,19 +561,19 @@ void initPrivateData(SbkObjectType* self) memset(self->d, 0, sizeof(SbkBaseTypePrivate)); } -} // namespace BaseType +} // namespace ObjectType namespace Wrapper { bool checkType(PyObject* pyObj) { - return BaseType::checkType(pyObj->ob_type); + return ObjectType::checkType(pyObj->ob_type); } bool isUserType(PyObject* pyObj) { - return BaseType::isUserType(pyObj->ob_type); + return ObjectType::isUserType(pyObj->ob_type); } static void setSequenceOwnership(PyObject* pyObj, bool owner) diff --git a/libshiboken/basewrapper.h b/libshiboken/basewrapper.h index 80207e251..7ae5502fc 100644 --- a/libshiboken/basewrapper.h +++ b/libshiboken/basewrapper.h @@ -108,7 +108,7 @@ void callCppDestructor(void* cptr) LIBSHIBOKEN_API bool importModule(const char* moduleName, PyTypeObject*** cppApiPtr); LIBSHIBOKEN_API void setErrorAboutWrongArguments(PyObject* args, const char* funcName, const char** cppOverloads); -namespace BaseType { +namespace ObjectType { /** * Returns true if the object is an instance of a type created by the Shiboken generator. diff --git a/libshiboken/conversions.h b/libshiboken/conversions.h index afc4989f4..5d0048fe8 100644 --- a/libshiboken/conversions.h +++ b/libshiboken/conversions.h @@ -99,7 +99,7 @@ struct CppObjectCopier { static inline T* copy(const T& obj) { - return reinterpret_cast(BaseType::copy(reinterpret_cast(SbkType()), &obj)); + return reinterpret_cast(ObjectType::copy(reinterpret_cast(SbkType()), &obj)); } }; @@ -214,7 +214,7 @@ struct ValueTypeConverter if (PyObject_TypeCheck(pyobj, SbkType())) return true; SbkObjectType* shiboType = reinterpret_cast(SbkType()); - return BaseType::isExternalConvertible(shiboType, pyobj); + return ObjectType::isExternalConvertible(shiboType, pyobj); } static inline PyObject* toPython(void* cppobj) { return toPython(*reinterpret_cast(cppobj)); } static inline PyObject* toPython(const T& cppobj) @@ -232,8 +232,8 @@ struct ValueTypeConverter { if (!PyObject_TypeCheck(pyobj, SbkType())) { SbkObjectType* shiboType = reinterpret_cast(SbkType()); - if (BaseType::hasExternalCppConversions(shiboType) && isConvertible(pyobj)) { - T* cptr = reinterpret_cast(BaseType::callExternalCppConversion(shiboType, pyobj)); + if (ObjectType::hasExternalCppConversions(shiboType) && isConvertible(pyobj)) { + T* cptr = reinterpret_cast(ObjectType::callExternalCppConversion(shiboType, pyobj)); std::auto_ptr cptr_auto_ptr(cptr); return *cptr; } @@ -272,8 +272,8 @@ struct ObjectTypeConverter if (pyobj == Py_None) return 0; SbkObjectType* shiboType = reinterpret_cast(pyobj->ob_type); - if (BaseType::hasCast(shiboType)) - return reinterpret_cast(BaseType::cast(shiboType, reinterpret_cast(pyobj), SbkType())); + if (ObjectType::hasCast(shiboType)) + return reinterpret_cast(ObjectType::cast(shiboType, reinterpret_cast(pyobj), SbkType())); return (T*) Wrapper::cppPointer(reinterpret_cast(pyobj), SbkType()); } }; -- cgit v1.2.3