summaryrefslogtreecommitdiffstats
path: root/libshiboken
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-01-26 11:45:23 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2011-01-26 14:32:10 -0200
commit434c1a56d407706af899fd58feb50957c2aea353 (patch)
treefdefc8856f465f6a29ea24247984ada13355ca29 /libshiboken
parentafe65270f1b28756172b72ba1d6af8f157a998bc (diff)
downloadshiboken-434c1a56d407706af899fd58feb50957c2aea353.tar.gz
shiboken-434c1a56d407706af899fd58feb50957c2aea353.tar.xz
shiboken-434c1a56d407706af899fd58feb50957c2aea353.zip
Fix bug#605 - "Using metaclasses with the PySide classes doesn't work"
Diffstat (limited to 'libshiboken')
-rw-r--r--libshiboken/basewrapper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp
index 2d82510e..055d7e62 100644
--- a/libshiboken/basewrapper.cpp
+++ b/libshiboken/basewrapper.cpp
@@ -284,7 +284,7 @@ void walkThroughClassHierarchy(PyTypeObject* currentType, HierarchyVisitor* visi
for (int i = 0; i < numBases; ++i) {
PyTypeObject* type = reinterpret_cast<PyTypeObject*>(PyTuple_GET_ITEM(bases, i));
- if (type->ob_type != &SbkObjectType_Type) {
+ if (!PyType_IsSubtype(type, reinterpret_cast<PyTypeObject*>(&SbkObject_Type))) {
continue;
} else {
SbkObjectType* sbkType = reinterpret_cast<SbkObjectType*>(type);
@@ -450,7 +450,7 @@ namespace ObjectType
bool checkType(PyTypeObject* type)
{
- return type->ob_type == &SbkObjectType_Type;
+ return PyType_IsSubtype(type, reinterpret_cast<PyTypeObject*>(&SbkObject_Type));
}
bool isUserType(PyTypeObject* type)