summaryrefslogtreecommitdiffstats
path: root/libshiboken
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-11-19 18:01:23 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-11-23 13:37:10 -0200
commit04dea49498d185e4be30987e0790c8b45aaef18b (patch)
treedfb58c8271996082e41ff4ab3752757bea168c45 /libshiboken
parentea46607ca87ce2233529c8177ab51424337613d2 (diff)
downloadshiboken-04dea49498d185e4be30987e0790c8b45aaef18b.tar.gz
shiboken-04dea49498d185e4be30987e0790c8b45aaef18b.tar.xz
shiboken-04dea49498d185e4be30987e0790c8b45aaef18b.zip
Namespace Shiboken::Wrapper renamed to Shiboken::Object.
Diffstat (limited to 'libshiboken')
-rw-r--r--libshiboken/basewrapper.cpp20
-rw-r--r--libshiboken/basewrapper.h10
-rw-r--r--libshiboken/basewrapper_p.h4
-rw-r--r--libshiboken/bindingmanager.cpp2
-rw-r--r--libshiboken/conversions.h16
5 files changed, 26 insertions, 26 deletions
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp
index 948a24e3..a19d569c 100644
--- a/libshiboken/basewrapper.cpp
+++ b/libshiboken/basewrapper.cpp
@@ -170,7 +170,7 @@ void SbkDeallocWrapper(PyObject* pyObj)
}
}
- Shiboken::Wrapper::deallocData(sbkObj);
+ Shiboken::Object::deallocData(sbkObj);
}
void SbkDeallocWrapperWithPrivateDtor(PyObject* self)
@@ -180,7 +180,7 @@ void SbkDeallocWrapperWithPrivateDtor(PyObject* self)
PyObject_ClearWeakRefs(self);
Shiboken::BindingManager::instance().releaseWrapper(sbkObj);
- Shiboken::Wrapper::deallocData(sbkObj);
+ Shiboken::Object::deallocData(sbkObj);
}
void SbkBaseTypeDealloc(PyObject* pyObj)
@@ -407,7 +407,7 @@ std::list<SbkObject*> splitPyObject(PyObject* pyObj)
if (!lst.isNull()) {
for(int i = 0, i_max = PySequence_Fast_GET_SIZE(lst.object()); i < i_max; i++) {
PyObject* item = PySequence_Fast_GET_ITEM(lst.object(), i);
- if (Wrapper::checkType(item))
+ if (Object::checkType(item))
result.push_back(reinterpret_cast<SbkObject*>(item));
}
}
@@ -503,7 +503,7 @@ bool hasCast(SbkObjectType* self)
void* cast(SbkObjectType* self, SbkObject* obj, PyTypeObject *target)
{
- return self->d->mi_specialcast(Wrapper::cppPointer(obj, target), reinterpret_cast<SbkObjectType*>(target));
+ return self->d->mi_specialcast(Object::cppPointer(obj, target), reinterpret_cast<SbkObjectType*>(target));
}
void setCastFunction(SbkObjectType* self, SpecialCastFunction func)
@@ -563,7 +563,7 @@ void initPrivateData(SbkObjectType* self)
} // namespace ObjectType
-namespace Wrapper
+namespace Object
{
bool checkType(PyObject* pyObj)
@@ -587,7 +587,7 @@ static void setSequenceOwnership(PyObject* pyObj, bool owner)
else
releaseOwnership(*it);
}
- } else if (Wrapper::checkType(pyObj)) {
+ } else if (Object::checkType(pyObj)) {
if (owner)
getOwnership(reinterpret_cast<SbkObject*>(pyObj));
else
@@ -603,7 +603,7 @@ static void _destroyParentInfo(SbkObject* obj, bool keepReference)
while(!pInfo->children.empty()) {
SbkObject* first = pInfo->children.front();
// Mark child as invalid
- Shiboken::Wrapper::invalidate(first);
+ Shiboken::Object::invalidate(first);
removeParent(first, false, keepReference);
}
removeParent(obj, false);
@@ -877,7 +877,7 @@ void setParent(PyObject* parent, PyObject* child)
* so if you pass this class to someone that takes the ownership, we CAN'T enter in this if, but hey! QString
* follows the sequence protocol.
*/
- if (PySequence_Check(child) && !Wrapper::checkType(child)) {
+ if (PySequence_Check(child) && !Object::checkType(child)) {
Shiboken::AutoDecRef seq(PySequence_Fast(child, 0));
for (int i = 0, max = PySequence_Size(seq); i < max; ++i)
setParent(parent, PySequence_Fast_GET_ITEM(seq.object(), i));
@@ -949,14 +949,14 @@ void deallocData(SbkObject* self)
Py_TYPE(self)->tp_free(self);
}
-void setTypeUserData(SbkObject* wrapper, void *user_data, DeleteUserDataFunc d_func)
+void setTypeUserData(SbkObject* wrapper, void* userData, DeleteUserDataFunc d_func)
{
SbkObjectType* ob_type = reinterpret_cast<SbkObjectType*>(wrapper->ob_type);
if (ob_type->d->user_data)
ob_type->d->d_func(ob_type->d->user_data);
ob_type->d->d_func = d_func;
- ob_type->d->user_data = user_data;
+ ob_type->d->user_data = userData;
}
void* getTypeUserData(SbkObject* wrapper)
diff --git a/libshiboken/basewrapper.h b/libshiboken/basewrapper.h
index 7ae5502f..cdc5f484 100644
--- a/libshiboken/basewrapper.h
+++ b/libshiboken/basewrapper.h
@@ -129,7 +129,7 @@ LIBSHIBOKEN_API bool canCallConstructor(PyTypeObject* myType, PyTypeObjec
/**
* Call copy function for the object type
**/
-LIBSHIBOKEN_API void* copy(SbkObjectType* self, const void *obj);
+LIBSHIBOKEN_API void* copy(SbkObjectType* self, const void* obj);
LIBSHIBOKEN_API void setCopyFunction(SbkObjectType* self, ObjectCopierFunction func);
LIBSHIBOKEN_API void setExternalCppConversionFunction(SbkObjectType* self, ExtendedToCppFunc func);
@@ -157,7 +157,7 @@ LIBSHIBOKEN_API void setDestructorFunction(SbkObjectType* self, ObjectDes
LIBSHIBOKEN_API void initPrivateData(SbkObjectType* self);
}
-namespace Wrapper {
+namespace Object {
/**
* Returns true if the object is an instance of a type created by the Shiboken generator.
@@ -242,7 +242,7 @@ LIBSHIBOKEN_API void destroy(SbkObject* self);
/**
* Get/Set Userdata in type class
*/
-LIBSHIBOKEN_API void setTypeUserData(SbkObject* wrapper, void* user_data, DeleteUserDataFunc d_func);
+LIBSHIBOKEN_API void setTypeUserData(SbkObject* wrapper, void* userData, DeleteUserDataFunc d_func);
LIBSHIBOKEN_API void* getTypeUserData(SbkObject* wrapper);
/**
@@ -257,9 +257,9 @@ LIBSHIBOKEN_API void* getTypeUserData(SbkObject* wrapper);
* \param key a key that identifies the C++ method signature and argument where the referredObject came from.
* \parem referredObject the object whose reference is used by the self object.
*/
-LIBSHIBOKEN_API void keepReference(SbkObject* self, const char* key, PyObject* referredObject, bool append=false);
+LIBSHIBOKEN_API void keepReference(SbkObject* self, const char* key, PyObject* referredObject, bool append = false);
-} // namespace Wrapper
+} // namespace Object
} // namespace Shiboken
diff --git a/libshiboken/basewrapper_p.h b/libshiboken/basewrapper_p.h
index ebf50d44..45fdb876 100644
--- a/libshiboken/basewrapper_p.h
+++ b/libshiboken/basewrapper_p.h
@@ -218,7 +218,7 @@ inline std::list<SbkObjectType*> getCppBaseClasses(PyTypeObject* baseType)
return visitor.bases();
}
-namespace Wrapper
+namespace Object
{
/**
* Decrements the reference counters of every object referred by self.
@@ -230,7 +230,7 @@ void clearReferences(SbkObject* self);
* Destroy internal data
**/
void deallocData(SbkObject* self);
-} // namespace Wrapper
+} // namespace Object
} // namespace Shiboken
diff --git a/libshiboken/bindingmanager.cpp b/libshiboken/bindingmanager.cpp
index dd9fb5d1..f0797042 100644
--- a/libshiboken/bindingmanager.cpp
+++ b/libshiboken/bindingmanager.cpp
@@ -148,7 +148,7 @@ BindingManager::~BindingManager()
* the BindingManager is being destroyed the interpreter is alredy
* shutting down. */
while (!m_d->wrapperMapper.empty()) {
- Wrapper::destroy(m_d->wrapperMapper.begin()->second);
+ Object::destroy(m_d->wrapperMapper.begin()->second);
}
assert(m_d->wrapperMapper.size() == 0);
delete m_d;
diff --git a/libshiboken/conversions.h b/libshiboken/conversions.h
index 5d0048fe..a49ec34d 100644
--- a/libshiboken/conversions.h
+++ b/libshiboken/conversions.h
@@ -113,7 +113,7 @@ inline PyObject* createWrapper(const T* cppobj, bool hasOwnership = false, bool
const char* typeName = 0;
if (!isExactType)
typeName = typeid(*const_cast<T*>(cppobj)).name();
- return Wrapper::newObject(reinterpret_cast<SbkObjectType*>(SbkType<T>()),
+ return Object::newObject(reinterpret_cast<SbkObjectType*>(SbkType<T>()),
const_cast<T*>(cppobj), hasOwnership, isExactType, typeName);
}
@@ -150,7 +150,7 @@ struct Converter<T*>
static T* toCpp(PyObject* pyobj)
{
if (PyObject_TypeCheck(pyobj, SbkType<T>()))
- return (T*) Wrapper::cppPointer(reinterpret_cast<SbkObject*>(pyobj), SbkType<T>());
+ return (T*) Object::cppPointer(reinterpret_cast<SbkObject*>(pyobj), SbkType<T>());
else if (Converter<T>::isConvertible(pyobj))
return CppObjectCopier<T>::copy(Converter<T>::toCpp(pyobj));
else if (pyobj == Py_None)
@@ -239,7 +239,7 @@ struct ValueTypeConverter
}
assert(false);
}
- return *reinterpret_cast<T*>(Wrapper::cppPointer(reinterpret_cast<SbkObject*>(pyobj), SbkType<T>()));
+ return *reinterpret_cast<T*>(Object::cppPointer(reinterpret_cast<SbkObject*>(pyobj), SbkType<T>()));
}
};
@@ -274,7 +274,7 @@ struct ObjectTypeConverter
SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(pyobj->ob_type);
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>());
+ return (T*) Object::cppPointer(reinterpret_cast<SbkObject*>(pyobj), SbkType<T>());
}
};
@@ -560,7 +560,7 @@ struct StdListConverter
// binded types implementing sequence protocol, otherwise this will
// cause a mess like QBitArray being accepted by someone expecting a
// QStringList.
- if ((SbkType<StdList>() && Wrapper::checkType(pyObj)) || !PySequence_Check(pyObj))
+ if ((SbkType<StdList>() && Object::checkType(pyObj)) || !PySequence_Check(pyObj))
return false;
for (int i = 0, max = PySequence_Length(pyObj); i < max; ++i) {
AutoDecRef item(PySequence_GetItem(pyObj, i));
@@ -583,7 +583,7 @@ struct StdListConverter
static StdList toCpp(PyObject* pyobj)
{
if (PyObject_TypeCheck(pyobj, SbkType<StdList>()))
- return *reinterpret_cast<StdList*>(Wrapper::cppPointer(reinterpret_cast<SbkObject*>(pyobj), SbkType<StdList>()));
+ return *reinterpret_cast<StdList*>(Object::cppPointer(reinterpret_cast<SbkObject*>(pyobj), SbkType<StdList>()));
StdList result;
for (int i = 0; i < PySequence_Size(pyobj); i++) {
@@ -606,7 +606,7 @@ struct StdPairConverter
{
if (PyObject_TypeCheck(pyObj, SbkType<StdPair>()))
return true;
- if ((SbkType<StdPair>() && Wrapper::checkType(pyObj)) || !PySequence_Check(pyObj) || PySequence_Length(pyObj) != 2)
+ if ((SbkType<StdPair>() && Object::checkType(pyObj)) || !PySequence_Check(pyObj) || PySequence_Length(pyObj) != 2)
return false;
AutoDecRef item1(PySequence_GetItem(pyObj, 0));
@@ -651,7 +651,7 @@ struct StdMapConverter
{
if (PyObject_TypeCheck(pyObj, SbkType<StdMap>()))
return true;
- if ((SbkType<StdMap>() && Wrapper::checkType(pyObj)) || !PyDict_Check(pyObj))
+ if ((SbkType<StdMap>() && Object::checkType(pyObj)) || !PyDict_Check(pyObj))
return false;
PyObject* key;