summaryrefslogtreecommitdiffstats
path: root/libshiboken
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-11-19 16:56:22 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-11-19 16:56:22 -0200
commit36b1807b8c5fe75faf87a593ac0e1d7e9ac8b887 (patch)
tree7abdab9e114a8837f01d093634063848ef6975a1 /libshiboken
parentb2096155a231797afd397acc8908acb691f3c732 (diff)
downloadshiboken-36b1807b8c5fe75faf87a593ac0e1d7e9ac8b887.tar.gz
shiboken-36b1807b8c5fe75faf87a593ac0e1d7e9ac8b887.tar.xz
shiboken-36b1807b8c5fe75faf87a593ac0e1d7e9ac8b887.zip
Rename SbkBaseType back to SbkObjectType.
Diffstat (limited to 'libshiboken')
-rw-r--r--libshiboken/basewrapper.cpp74
-rw-r--r--libshiboken/basewrapper.h50
-rw-r--r--libshiboken/basewrapper_p.h18
-rw-r--r--libshiboken/bindingmanager.cpp22
-rw-r--r--libshiboken/bindingmanager.h6
-rw-r--r--libshiboken/conversions.h10
6 files changed, 90 insertions, 90 deletions
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp
index 39c18c3e..5c47a357 100644
--- a/libshiboken/basewrapper.cpp
+++ b/libshiboken/basewrapper.cpp
@@ -41,7 +41,7 @@ PyTypeObject SbkBaseType_Type = {
PyObject_HEAD_INIT(0)
/*ob_size*/ 0,
/*tp_name*/ "Shiboken.ObjectType",
- /*tp_basicsize*/ sizeof(SbkBaseType),
+ /*tp_basicsize*/ sizeof(SbkObjectType),
/*tp_itemsize*/ 0,
/*tp_dealloc*/ SbkBaseTypeDealloc,
/*tp_print*/ 0,
@@ -101,7 +101,7 @@ static PyGetSetDef SbkObjectGetSetList[] = {
{0} // Sentinel
};
-SbkBaseType SbkObject_Type = { { {
+SbkObjectType SbkObject_Type = { { {
PyObject_HEAD_INIT(&SbkBaseType_Type)
/*ob_size*/ 0,
/*tp_name*/ "Shiboken.Object",
@@ -161,7 +161,7 @@ void SbkDeallocWrapper(PyObject* pyObj)
// If I have ownership and is valid delete C++ pointer
if (sbkObj->d->hasOwnership && sbkObj->d->validCppObject) {
- SbkBaseType* sbkType = reinterpret_cast<SbkBaseType*>(pyObj->ob_type);
+ SbkObjectType* sbkType = reinterpret_cast<SbkObjectType*>(pyObj->ob_type);
if (sbkType->d->is_multicpp) {
Shiboken::DtorCallerVisitor visitor(sbkObj);
Shiboken::walkThroughClassHierarchy(pyObj->ob_type, &visitor);
@@ -185,7 +185,7 @@ void SbkDeallocWrapperWithPrivateDtor(PyObject* self)
void SbkBaseTypeDealloc(PyObject* pyObj)
{
- SbkBaseType *sbkType = reinterpret_cast<SbkBaseType*>(pyObj->ob_type);
+ SbkObjectType* sbkType = reinterpret_cast<SbkObjectType*>(pyObj->ob_type);
if (!sbkType->d)
return;
@@ -202,7 +202,7 @@ void SbkBaseTypeDealloc(PyObject* pyObj)
PyObject* SbkBaseTypeTpNew(PyTypeObject* metatype, PyObject* args, PyObject* kwds)
{
// The meta type creates a new type when the Python programmer extends a wrapped C++ class.
- SbkBaseType* newType = reinterpret_cast<SbkBaseType*>(PyType_Type.tp_new(metatype, args, kwds));
+ SbkObjectType* newType = reinterpret_cast<SbkObjectType*>(PyType_Type.tp_new(metatype, args, kwds));
if (!newType)
return 0;
@@ -210,7 +210,7 @@ PyObject* SbkBaseTypeTpNew(PyTypeObject* metatype, PyObject* args, PyObject* kwd
SbkBaseTypePrivate* d = new SbkBaseTypePrivate;
memset(d, 0, sizeof(SbkBaseTypePrivate));
- std::list<SbkBaseType*> bases = Shiboken::getCppBaseClasses(reinterpret_cast<PyTypeObject*>(newType));
+ std::list<SbkObjectType*> bases = Shiboken::getCppBaseClasses(reinterpret_cast<PyTypeObject*>(newType));
if (bases.size() == 1) {
SbkBaseTypePrivate* parentType = bases.front()->d;
d->mi_offsets = parentType->mi_offsets;
@@ -249,7 +249,7 @@ PyObject* SbkObjectTpNew(PyTypeObject* subtype, PyObject*, PyObject*)
SbkObject* self = reinterpret_cast<SbkObject*>(subtype->tp_alloc(subtype, 0));
self->d = new SbkObjectPrivate;
- SbkBaseType* sbkType = reinterpret_cast<SbkBaseType*>(subtype);
+ SbkObjectType* sbkType = reinterpret_cast<SbkObjectType*>(subtype);
int numBases = ((sbkType->d && sbkType->d->is_multicpp) ? Shiboken::getNumberOfCppBaseClasses(subtype) : 1);
self->d->cptr = new void*[numBases];
std::memset(self->d->cptr, 0, sizeof(void*)*numBases);
@@ -282,7 +282,7 @@ void walkThroughClassHierarchy(PyTypeObject* currentType, HierarchyVisitor* visi
if (type->ob_type != &SbkBaseType_Type) {
continue;
} else {
- SbkBaseType* sbkType = reinterpret_cast<SbkBaseType*>(type);
+ SbkObjectType* sbkType = reinterpret_cast<SbkObjectType*>(type);
if (sbkType->d->is_user_type)
walkThroughClassHierarchy(type, visitor);
else
@@ -311,7 +311,7 @@ bool importModule(const char* moduleName, PyTypeObject*** cppApiPtr)
// Wrapper metatype and base type ----------------------------------------------------------
-void DtorCallerVisitor::visit(SbkBaseType* node)
+void DtorCallerVisitor::visit(SbkObjectType* node)
{
node->d->cpp_dtor(m_pyObj->d->cptr[m_count]);
m_count++;
@@ -385,7 +385,7 @@ class FindBaseTypeVisitor : public HierarchyVisitor
{
public:
FindBaseTypeVisitor(PyTypeObject* typeToFind) : m_found(false), m_typeToFind(typeToFind) {}
- virtual void visit(SbkBaseType* node)
+ virtual void visit(SbkObjectType* node)
{
if (reinterpret_cast<PyTypeObject*>(node) == m_typeToFind) {
m_found = true;
@@ -447,7 +447,7 @@ bool checkType(PyTypeObject* type)
bool isUserType(PyTypeObject* type)
{
- return BaseType::checkType(type) && reinterpret_cast<SbkBaseType*>(type)->d->is_user_type;
+ return BaseType::checkType(type) && reinterpret_cast<SbkObjectType*>(type)->d->is_user_type;
}
bool canCallConstructor(PyTypeObject* myType, PyTypeObject* ctorType)
@@ -461,101 +461,101 @@ bool canCallConstructor(PyTypeObject* myType, PyTypeObject* ctorType)
return true;
}
-void* copy(SbkBaseType* self, const void* obj)
+void* copy(SbkObjectType* self, const void* obj)
{
return self->d->obj_copier(obj);
}
-void setCopyFunction(SbkBaseType* self, ObjectCopierFunction func)
+void setCopyFunction(SbkObjectType* self, ObjectCopierFunction func)
{
self->d->obj_copier = func;
}
-bool hasExternalCppConversions(SbkBaseType* self)
+bool hasExternalCppConversions(SbkObjectType* self)
{
return self->d->ext_tocpp;
}
-void* callExternalCppConversion(SbkBaseType* self, PyObject* obj)
+void* callExternalCppConversion(SbkObjectType* self, PyObject* obj)
{
return self->d->ext_tocpp(obj);
}
-void setExternalCppConversionFunction(SbkBaseType* self, ExtendedToCppFunc func)
+void setExternalCppConversionFunction(SbkObjectType* self, ExtendedToCppFunc func)
{
self->d->ext_tocpp = func;
}
-void setExternalIsConvertibleFunction(SbkBaseType* self, ExtendedIsConvertibleFunc func)
+void setExternalIsConvertibleFunction(SbkObjectType* self, ExtendedIsConvertibleFunc func)
{
self->d->ext_isconvertible = func;
}
-bool isExternalConvertible(SbkBaseType* self, PyObject* obj)
+bool isExternalConvertible(SbkObjectType* self, PyObject* obj)
{
return self->d->ext_isconvertible && self->d->ext_isconvertible(obj);
}
-bool hasCast(SbkBaseType* self)
+bool hasCast(SbkObjectType* self)
{
return self->d->mi_specialcast;
}
-void* cast(SbkBaseType* self, SbkObject* obj, PyTypeObject *target)
+void* cast(SbkObjectType* self, SbkObject* obj, PyTypeObject *target)
{
- return self->d->mi_specialcast(Wrapper::cppPointer(obj, target), reinterpret_cast<SbkBaseType*>(target));
+ return self->d->mi_specialcast(Wrapper::cppPointer(obj, target), reinterpret_cast<SbkObjectType*>(target));
}
-void setCastFunction(SbkBaseType* self, SpecialCastFunction func)
+void setCastFunction(SbkObjectType* self, SpecialCastFunction func)
{
self->d->mi_specialcast = func;
}
-void setOriginalName(SbkBaseType* self, const char* name)
+void setOriginalName(SbkObjectType* self, const char* name)
{
if (self->d->original_name)
free(self->d->original_name);
self->d->original_name = strdup(name);
}
-const char* getOriginalName(SbkBaseType* self)
+const char* getOriginalName(SbkObjectType* self)
{
return self->d->original_name;
}
-void setTypeDiscoveryFunction(SbkBaseType* self, TypeDiscoveryFunc func)
+void setTypeDiscoveryFunction(SbkObjectType* self, TypeDiscoveryFunc func)
{
self->d->type_discovery = func;
}
-TypeDiscoveryFunc getTypeDiscoveryFunction(SbkBaseType* self)
+TypeDiscoveryFunc getTypeDiscoveryFunction(SbkObjectType* self)
{
return self->d->type_discovery;
}
-void copyMultimpleheritance(SbkBaseType* self, SbkBaseType* other)
+void copyMultimpleheritance(SbkObjectType* self, SbkObjectType* other)
{
self->d->mi_init = other->d->mi_init;
self->d->mi_offsets = other->d->mi_offsets;
self->d->mi_specialcast = other->d->mi_specialcast;
}
-void setMultipleIheritanceFunction(SbkBaseType* self, MultipleInheritanceInitFunction function)
+void setMultipleIheritanceFunction(SbkObjectType* self, MultipleInheritanceInitFunction function)
{
self->d->mi_init = function;
}
-MultipleInheritanceInitFunction getMultipleIheritanceFunction(SbkBaseType* self)
+MultipleInheritanceInitFunction getMultipleIheritanceFunction(SbkObjectType* self)
{
return self->d->mi_init;
}
-void setDestructorFunction(SbkBaseType* self, ObjectDestructor func)
+void setDestructorFunction(SbkObjectType* self, ObjectDestructor func)
{
self->d->cpp_dtor = func;
}
-void initPrivateData(SbkBaseType* self)
+void initPrivateData(SbkObjectType* self)
{
self->d = new SbkBaseTypePrivate;
memset(self->d, 0, sizeof(SbkBaseTypePrivate));
@@ -740,7 +740,7 @@ void* cppPointer(SbkObject* pyObj, PyTypeObject* desiredType)
{
PyTypeObject* type = pyObj->ob_type;
int idx = 0;
- if (reinterpret_cast<SbkBaseType*>(type)->d->is_multicpp)
+ if (reinterpret_cast<SbkObjectType*>(type)->d->is_multicpp)
idx = getTypeIndexOnHierarchy(type, desiredType);
return pyObj->d->cptr[idx];
}
@@ -748,7 +748,7 @@ void* cppPointer(SbkObject* pyObj, PyTypeObject* desiredType)
bool setCppPointer(SbkObject* sbkObj, PyTypeObject* desiredType, void* cptr)
{
int idx = 0;
- if (reinterpret_cast<SbkBaseType*>(sbkObj->ob_type)->d->is_multicpp)
+ if (reinterpret_cast<SbkObjectType*>(sbkObj->ob_type)->d->is_multicpp)
idx = getTypeIndexOnHierarchy(sbkObj->ob_type, desiredType);
bool alreadyInitialized = sbkObj->d->cptr[idx];
@@ -771,7 +771,7 @@ bool isValid(PyObject* pyObj)
return false;
}
-PyObject* newObject(SbkBaseType* instanceType,
+PyObject* newObject(SbkObjectType* instanceType,
void* cptr,
bool hasOwnership,
bool isExactType,
@@ -783,7 +783,7 @@ PyObject* newObject(SbkBaseType* instanceType,
if (typeName) {
tr = TypeResolver::get(typeName);
if (tr)
- instanceType = reinterpret_cast<SbkBaseType*>(tr->pythonType());
+ instanceType = reinterpret_cast<SbkObjectType*>(tr->pythonType());
}
if (!tr)
instanceType = BindingManager::instance().resolveType(cptr, instanceType);
@@ -951,7 +951,7 @@ void deallocData(SbkObject* self)
void setTypeUserData(SbkObject* wrapper, void *user_data, DeleteUserDataFunc d_func)
{
- SbkBaseType* ob_type = reinterpret_cast<SbkBaseType*>(wrapper->ob_type);
+ 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);
@@ -961,7 +961,7 @@ void setTypeUserData(SbkObject* wrapper, void *user_data, DeleteUserDataFunc d_f
void* getTypeUserData(SbkObject* wrapper)
{
- return reinterpret_cast<SbkBaseType*>(wrapper->ob_type)->d->user_data;
+ return reinterpret_cast<SbkObjectType*>(wrapper->ob_type)->d->user_data;
}
void keepReference(SbkObject* self, const char* key, PyObject* referredObject, bool append)
diff --git a/libshiboken/basewrapper.h b/libshiboken/basewrapper.h
index aa1301df..80207e25 100644
--- a/libshiboken/basewrapper.h
+++ b/libshiboken/basewrapper.h
@@ -51,7 +51,7 @@ struct LIBSHIBOKEN_API SbkObject
LIBSHIBOKEN_API void SbkDeallocWrapper(PyObject* pyObj);
LIBSHIBOKEN_API void SbkDeallocWrapperWithPrivateDtor(PyObject* self);
-struct SbkBaseType;
+struct SbkObjectType;
/// Function signature for the multiple inheritance information initializers that should be provided by classes with multiple inheritance.
typedef int* (*MultipleInheritanceInitFunction)(const void*);
@@ -61,9 +61,9 @@ typedef int* (*MultipleInheritanceInitFunction)(const void*);
* part of a multiple inheritance hierarchy.
* The implementation of this function is auto generated by the generator and you don't need to care about it.
*/
-typedef void* (*SpecialCastFunction)(void*, SbkBaseType*);
+typedef void* (*SpecialCastFunction)(void*, SbkObjectType*);
typedef void* (*ObjectCopierFunction)(const void*);
-typedef SbkBaseType* (*TypeDiscoveryFunc)(void*, SbkBaseType*);
+typedef SbkObjectType* (*TypeDiscoveryFunc)(void*, SbkObjectType*);
typedef void* (*ExtendedToCppFunc)(PyObject*);
typedef bool (*ExtendedIsConvertibleFunc)(PyObject*);
@@ -74,12 +74,12 @@ typedef void (*DeleteUserDataFunc)(void*);
typedef void (*ObjectDestructor)(void*);
extern LIBSHIBOKEN_API PyTypeObject SbkBaseType_Type;
-extern LIBSHIBOKEN_API SbkBaseType SbkObject_Type;
+extern LIBSHIBOKEN_API SbkObjectType SbkObject_Type;
struct SbkBaseTypePrivate;
/// PyTypeObject extended with C++ multiple inheritance information.
-struct LIBSHIBOKEN_API SbkBaseType
+struct LIBSHIBOKEN_API SbkObjectType
{
PyHeapTypeObject super;
SbkBaseTypePrivate* d;
@@ -129,32 +129,32 @@ LIBSHIBOKEN_API bool canCallConstructor(PyTypeObject* myType, PyTypeObjec
/**
* Call copy function for the object type
**/
-LIBSHIBOKEN_API void* copy(SbkBaseType* self, const void *obj);
-LIBSHIBOKEN_API void setCopyFunction(SbkBaseType* self, ObjectCopierFunction func);
+LIBSHIBOKEN_API void* copy(SbkObjectType* self, const void *obj);
+LIBSHIBOKEN_API void setCopyFunction(SbkObjectType* self, ObjectCopierFunction func);
-LIBSHIBOKEN_API void setExternalCppConversionFunction(SbkBaseType* self, ExtendedToCppFunc func);
-LIBSHIBOKEN_API void setExternalIsConvertibleFunction(SbkBaseType* self, ExtendedIsConvertibleFunc func);
-LIBSHIBOKEN_API bool hasExternalCppConversions(SbkBaseType* self);
-LIBSHIBOKEN_API bool isExternalConvertible(SbkBaseType* self, PyObject* obj);
-LIBSHIBOKEN_API void* callExternalCppConversion(SbkBaseType* self, PyObject* obj);
+LIBSHIBOKEN_API void setExternalCppConversionFunction(SbkObjectType* self, ExtendedToCppFunc func);
+LIBSHIBOKEN_API void setExternalIsConvertibleFunction(SbkObjectType* self, ExtendedIsConvertibleFunc func);
+LIBSHIBOKEN_API bool hasExternalCppConversions(SbkObjectType* self);
+LIBSHIBOKEN_API bool isExternalConvertible(SbkObjectType* self, PyObject* obj);
+LIBSHIBOKEN_API void* callExternalCppConversion(SbkObjectType* self, PyObject* obj);
-LIBSHIBOKEN_API bool hasCast(SbkBaseType* self);
-LIBSHIBOKEN_API void* cast(SbkBaseType* self, SbkObject* obj, PyTypeObject* target);
-LIBSHIBOKEN_API void setCastFunction(SbkBaseType* self, SpecialCastFunction func);
+LIBSHIBOKEN_API bool hasCast(SbkObjectType* self);
+LIBSHIBOKEN_API void* cast(SbkObjectType* self, SbkObject* obj, PyTypeObject* target);
+LIBSHIBOKEN_API void setCastFunction(SbkObjectType* self, SpecialCastFunction func);
-LIBSHIBOKEN_API void setOriginalName(SbkBaseType* self, const char* name);
-LIBSHIBOKEN_API const char* getOriginalName(SbkBaseType* self);
+LIBSHIBOKEN_API void setOriginalName(SbkObjectType* self, const char* name);
+LIBSHIBOKEN_API const char* getOriginalName(SbkObjectType* self);
-LIBSHIBOKEN_API void setTypeDiscoveryFunction(SbkBaseType* self, TypeDiscoveryFunc func);
-LIBSHIBOKEN_API TypeDiscoveryFunc getTypeDiscoveryFunction(SbkBaseType* self);
+LIBSHIBOKEN_API void setTypeDiscoveryFunction(SbkObjectType* self, TypeDiscoveryFunc func);
+LIBSHIBOKEN_API TypeDiscoveryFunc getTypeDiscoveryFunction(SbkObjectType* self);
-LIBSHIBOKEN_API void copyMultimpleheritance(SbkBaseType* self, SbkBaseType* other);
-LIBSHIBOKEN_API void setMultipleIheritanceFunction(SbkBaseType* self, MultipleInheritanceInitFunction func);
-LIBSHIBOKEN_API MultipleInheritanceInitFunction getMultipleIheritanceFunction(SbkBaseType* self);
+LIBSHIBOKEN_API void copyMultimpleheritance(SbkObjectType* self, SbkObjectType* other);
+LIBSHIBOKEN_API void setMultipleIheritanceFunction(SbkObjectType* self, MultipleInheritanceInitFunction func);
+LIBSHIBOKEN_API MultipleInheritanceInitFunction getMultipleIheritanceFunction(SbkObjectType* self);
-LIBSHIBOKEN_API void setDestructorFunction(SbkBaseType* self, ObjectDestructor func);
+LIBSHIBOKEN_API void setDestructorFunction(SbkObjectType* self, ObjectDestructor func);
-LIBSHIBOKEN_API void initPrivateData(SbkBaseType* self);
+LIBSHIBOKEN_API void initPrivateData(SbkObjectType* self);
}
namespace Wrapper {
@@ -166,7 +166,7 @@ LIBSHIBOKEN_API bool checkType(PyObject* pyObj);
LIBSHIBOKEN_API bool isUserType(PyObject* pyObj);
-LIBSHIBOKEN_API PyObject* newObject(SbkBaseType* instanceType,
+LIBSHIBOKEN_API PyObject* newObject(SbkObjectType* instanceType,
void* cptr,
bool hasOwnership = true,
bool isExactType = false,
diff --git a/libshiboken/basewrapper_p.h b/libshiboken/basewrapper_p.h
index 702fdbd0..ebf50d44 100644
--- a/libshiboken/basewrapper_p.h
+++ b/libshiboken/basewrapper_p.h
@@ -28,7 +28,7 @@
#include <map>
struct SbkObject;
-struct SbkBaseType;
+struct SbkObjectType;
namespace Shiboken
{
@@ -125,7 +125,7 @@ class HierarchyVisitor
public:
HierarchyVisitor() : m_wasFinished(false) {}
virtual ~HierarchyVisitor() {}
- virtual void visit(SbkBaseType* node) = 0;
+ virtual void visit(SbkObjectType* node) = 0;
void finish() { m_wasFinished = true; };
bool wasFinished() const { return m_wasFinished; }
private:
@@ -137,7 +137,7 @@ class BaseCountVisitor : public HierarchyVisitor
public:
BaseCountVisitor() : m_count(0) {}
- void visit(SbkBaseType*)
+ void visit(SbkObjectType*)
{
m_count++;
}
@@ -152,21 +152,21 @@ class BaseAccumulatorVisitor : public HierarchyVisitor
public:
BaseAccumulatorVisitor() {}
- void visit(SbkBaseType* node)
+ void visit(SbkObjectType* node)
{
m_bases.push_back(node);
}
- std::list<SbkBaseType*> bases() const { return m_bases; }
+ std::list<SbkObjectType*> bases() const { return m_bases; }
private:
- std::list<SbkBaseType*> m_bases;
+ std::list<SbkObjectType*> m_bases;
};
class GetIndexVisitor : public HierarchyVisitor
{
public:
GetIndexVisitor(PyTypeObject* desiredType) : m_index(-1), m_desiredType(desiredType) {}
- virtual void visit(SbkBaseType* node)
+ virtual void visit(SbkObjectType* node)
{
m_index++;
if (PyType_IsSubtype(reinterpret_cast<PyTypeObject*>(node), m_desiredType))
@@ -183,7 +183,7 @@ class DtorCallerVisitor : public HierarchyVisitor
{
public:
DtorCallerVisitor(SbkObject* pyObj) : m_count(0), m_pyObj(pyObj) {}
- void visit(SbkBaseType* node);
+ void visit(SbkObjectType* node);
private:
int m_count;
SbkObject* m_pyObj;
@@ -211,7 +211,7 @@ inline int getNumberOfCppBaseClasses(PyTypeObject* baseType)
return visitor.count();
}
-inline std::list<SbkBaseType*> getCppBaseClasses(PyTypeObject* baseType)
+inline std::list<SbkObjectType*> getCppBaseClasses(PyTypeObject* baseType)
{
BaseAccumulatorVisitor visitor;
walkThroughClassHierarchy(baseType, &visitor);
diff --git a/libshiboken/bindingmanager.cpp b/libshiboken/bindingmanager.cpp
index 3742f6fe..dd9fb5d1 100644
--- a/libshiboken/bindingmanager.cpp
+++ b/libshiboken/bindingmanager.cpp
@@ -37,8 +37,8 @@ typedef google::dense_hash_map<const void*, SbkObject*> WrapperMap;
class Graph
{
public:
- typedef std::list<SbkBaseType*> NodeList;
- typedef google::dense_hash_map<SbkBaseType*, NodeList> Edges;
+ typedef std::list<SbkObjectType*> NodeList;
+ typedef google::dense_hash_map<SbkObjectType*, NodeList> Edges;
Edges m_edges;
@@ -47,7 +47,7 @@ public:
m_edges.set_empty_key(0);
}
- void addEdge(SbkBaseType* from, SbkBaseType* to)
+ void addEdge(SbkObjectType* from, SbkObjectType* to)
{
m_edges[from].push_back(to);
}
@@ -61,7 +61,7 @@ public:
Edges::const_iterator i = m_edges.begin();
for (; i != m_edges.end(); ++i) {
- SbkBaseType* node1 = i->first;
+ SbkObjectType* node1 = i->first;
const NodeList& nodeList = i->second;
NodeList::const_iterator j = nodeList.begin();
for (; j != nodeList.end(); ++j)
@@ -71,14 +71,14 @@ public:
}
#endif
- SbkBaseType* identifyType(void* cptr, SbkBaseType* type, SbkBaseType* baseType) const
+ SbkObjectType* identifyType(void* cptr, SbkObjectType* type, SbkObjectType* baseType) const
{
Edges::const_iterator edgesIt = m_edges.find(type);
if (edgesIt != m_edges.end()) {
const NodeList& adjNodes = m_edges.find(type)->second;
NodeList::const_iterator i = adjNodes.begin();
for (; i != adjNodes.end(); ++i) {
- SbkBaseType* newType = identifyType(cptr, *i, baseType);
+ SbkObjectType* newType = identifyType(cptr, *i, baseType);
if (newType)
return newType;
}
@@ -166,7 +166,7 @@ bool BindingManager::hasWrapper(const void* cptr)
void BindingManager::registerWrapper(SbkObject* pyObj, void* cptr)
{
- SbkBaseType* instanceType = reinterpret_cast<SbkBaseType*>(pyObj->ob_type);
+ SbkObjectType* instanceType = reinterpret_cast<SbkObjectType*>(pyObj->ob_type);
SbkBaseTypePrivate* d = instanceType->d;
if (!d)
@@ -187,7 +187,7 @@ void BindingManager::registerWrapper(SbkObject* pyObj, void* cptr)
void BindingManager::releaseWrapper(SbkObject* sbkObj)
{
- SbkBaseType* sbkType = reinterpret_cast<SbkBaseType*>(sbkObj->ob_type);
+ SbkObjectType* sbkType = reinterpret_cast<SbkObjectType*>(sbkObj->ob_type);
SbkBaseTypePrivate* d = sbkType->d;
int numBases = ((d && d->is_multicpp) ? getNumberOfCppBaseClasses(sbkObj->ob_type) : 1);
@@ -255,14 +255,14 @@ PyObject* BindingManager::getOverride(const void* cptr, const char* methodName)
return 0;
}
-void BindingManager::addClassInheritance(SbkBaseType* parent, SbkBaseType* child)
+void BindingManager::addClassInheritance(SbkObjectType* parent, SbkObjectType* child)
{
m_d->classHierarchy.addEdge(parent, child);
}
-SbkBaseType* BindingManager::resolveType(void* cptr, SbkBaseType* type)
+SbkObjectType* BindingManager::resolveType(void* cptr, SbkObjectType* type)
{
- SbkBaseType* identifiedType = m_d->classHierarchy.identifyType(cptr, type, type);
+ SbkObjectType* identifiedType = m_d->classHierarchy.identifyType(cptr, type, type);
return identifiedType ? identifiedType : type;
}
diff --git a/libshiboken/bindingmanager.h b/libshiboken/bindingmanager.h
index 2ead2351..b6d4ac42 100644
--- a/libshiboken/bindingmanager.h
+++ b/libshiboken/bindingmanager.h
@@ -28,7 +28,7 @@
#include "shibokenmacros.h"
struct SbkObject;
-struct SbkBaseType;
+struct SbkObjectType;
namespace Shiboken
{
@@ -46,8 +46,8 @@ public:
SbkObject* retrieveWrapper(const void* cptr);
PyObject* getOverride(const void* cptr, const char* methodName);
- void addClassInheritance(SbkBaseType* parent, SbkBaseType* child);
- SbkBaseType* resolveType(void* cptr, SbkBaseType* type);
+ void addClassInheritance(SbkObjectType* parent, SbkObjectType* child);
+ SbkObjectType* resolveType(void* cptr, SbkObjectType* type);
std::set<SbkObject*> getAllPyObjects();
private:
diff --git a/libshiboken/conversions.h b/libshiboken/conversions.h
index d6a3dd5e..afc4989f 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<SbkBaseType*>(SbkType<T>()), &obj));
+ return reinterpret_cast<T*>(BaseType::copy(reinterpret_cast<SbkObjectType*>(SbkType<T>()), &obj));
}
};
@@ -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<SbkBaseType*>(SbkType<T>()),
+ return Wrapper::newObject(reinterpret_cast<SbkObjectType*>(SbkType<T>()),
const_cast<T*>(cppobj), hasOwnership, isExactType, typeName);
}
@@ -213,7 +213,7 @@ struct ValueTypeConverter
{
if (PyObject_TypeCheck(pyobj, SbkType<T>()))
return true;
- SbkBaseType* shiboType = reinterpret_cast<SbkBaseType*>(SbkType<T>());
+ SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType<T>());
return BaseType::isExternalConvertible(shiboType, pyobj);
}
static inline PyObject* toPython(void* cppobj) { return toPython(*reinterpret_cast<T*>(cppobj)); }
@@ -231,7 +231,7 @@ struct ValueTypeConverter
static inline T toCpp(PyObject* pyobj)
{
if (!PyObject_TypeCheck(pyobj, SbkType<T>())) {
- SbkBaseType* shiboType = reinterpret_cast<SbkBaseType*>(SbkType<T>());
+ SbkObjectType* shiboType = reinterpret_cast<SbkObjectType*>(SbkType<T>());
if (BaseType::hasExternalCppConversions(shiboType) && isConvertible(pyobj)) {
T* cptr = reinterpret_cast<T*>(BaseType::callExternalCppConversion(shiboType, pyobj));
std::auto_ptr<T> cptr_auto_ptr(cptr);
@@ -271,7 +271,7 @@ struct ObjectTypeConverter
{
if (pyobj == Py_None)
return 0;
- SbkBaseType* shiboType = reinterpret_cast<SbkBaseType*>(pyobj->ob_type);
+ 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>()));
return (T*) Wrapper::cppPointer(reinterpret_cast<SbkObject*>(pyobj), SbkType<T>());