aboutsummaryrefslogtreecommitdiffstats
path: root/libshiboken
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-11-19 17:56:10 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:08:59 -0300
commit2927e38cb46d3aa2cf278238d2a585d96f669d91 (patch)
tree995d9feaabe6439d26f87753abd71608ab563d58 /libshiboken
parentbe2c1160275e63c148297b0001e735e3969f0b7e (diff)
namespace Shiboken::BaseType renamed to Shiboken::ObjectType.
Diffstat (limited to 'libshiboken')
-rw-r--r--libshiboken/basewrapper.cpp10
-rw-r--r--libshiboken/basewrapper.h2
-rw-r--r--libshiboken/conversions.h12
3 files changed, 12 insertions, 12 deletions
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<SbkObject*>& 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<SbkObjectType*>(type)->d->is_user_type;
+ return checkType(type) && reinterpret_cast<SbkObjectType*>(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<T, true>
{
static inline T* copy(const T& obj)
{
- return reinterpret_cast<T*>(BaseType::copy(reinterpret_cast<SbkObjectType*>(SbkType<T>()), &obj));
+ return reinterpret_cast<T*>(ObjectType::copy(reinterpret_cast<SbkObjectType*>(SbkType<T>()), &obj));
}
};
@@ -214,7 +214,7 @@ struct ValueTypeConverter
if (PyObject_TypeCheck(pyobj, SbkType<T>()))
return true;
SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType<T>());
- return BaseType::isExternalConvertible(shiboType, pyobj);
+ return ObjectType::isExternalConvertible(shiboType, pyobj);
}
static inline PyObject* toPython(void* cppobj) { return toPython(*reinterpret_cast<T*>(cppobj)); }
static inline PyObject* toPython(const T& cppobj)
@@ -232,8 +232,8 @@ struct ValueTypeConverter
{
if (!PyObject_TypeCheck(pyobj, SbkType<T>())) {
SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType<T>());
- if (BaseType::hasExternalCppConversions(shiboType) && isConvertible(pyobj)) {
- T* cptr = reinterpret_cast<T*>(BaseType::callExternalCppConversion(shiboType, pyobj));
+ if (ObjectType::hasExternalCppConversions(shiboType) && isConvertible(pyobj)) {
+ T* cptr = reinterpret_cast<T*>(ObjectType::callExternalCppConversion(shiboType, pyobj));
std::auto_ptr<T> cptr_auto_ptr(cptr);
return *cptr;
}
@@ -272,8 +272,8 @@ struct ObjectTypeConverter
if (pyobj == Py_None)
return 0;
SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(pyobj->ob_type);
- if (BaseType::hasCast(shiboType))
- return reinterpret_cast<T*>(BaseType::cast(shiboType, reinterpret_cast<SbkObject*>(pyobj), SbkType<T>()));
+ if (ObjectType::hasCast(shiboType))
+ return reinterpret_cast<T*>(ObjectType::cast(shiboType, reinterpret_cast<SbkObject*>(pyobj), SbkType<T>()));
return (T*) Wrapper::cppPointer(reinterpret_cast<SbkObject*>(pyobj), SbkType<T>());
}
};