summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-11-19 19:04:30 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-11-23 13:37:10 -0200
commit622e6f61a08b8ef31dd996609d69812f53e566b8 (patch)
treedbe1925a6cbaef715da32a5946fde818c4873762
parent2a3262852ad7f44648624e1c2f20393fa02019da (diff)
downloadshiboken-622e6f61a08b8ef31dd996609d69812f53e566b8.tar.gz
shiboken-622e6f61a08b8ef31dd996609d69812f53e566b8.tar.xz
shiboken-622e6f61a08b8ef31dd996609d69812f53e566b8.zip
SbkBaseType_Type renamed to SbkObjectType_Type.
-rw-r--r--generator/cppgenerator.cpp2
-rw-r--r--libshiboken/basewrapper.cpp12
-rw-r--r--libshiboken/basewrapper.h2
3 files changed, 8 insertions, 8 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index aaa6d679..6e7ba558 100644
--- a/generator/cppgenerator.cpp
+++ b/generator/cppgenerator.cpp
@@ -2413,7 +2413,7 @@ void CppGenerator::writeClassDefinition(QTextStream& s, const AbstractMetaClass*
s << "// Class Definition -----------------------------------------------" << endl;
s << "extern \"C\" {" << endl;
s << "static SbkObjectType " << className + "_Type" << " = { { {" << endl;
- s << INDENT << "PyObject_HEAD_INIT(&SbkBaseType_Type)" << endl;
+ s << INDENT << "PyObject_HEAD_INIT(&SbkObjectType_Type)" << endl;
s << INDENT << "/*ob_size*/ 0," << endl;
s << INDENT << "/*tp_name*/ \"" << metaClass->fullName() << "\"," << endl;
s << INDENT << "/*tp_basicsize*/ sizeof(SbkObject)," << endl;
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp
index 1afa5529..48ed8084 100644
--- a/libshiboken/basewrapper.cpp
+++ b/libshiboken/basewrapper.cpp
@@ -37,7 +37,7 @@ extern "C"
static void SbkObjectTypeDealloc(PyObject* pyObj);
static PyObject* SbkObjectTypeTpNew(PyTypeObject* metatype, PyObject* args, PyObject* kwds);
-PyTypeObject SbkBaseType_Type = {
+PyTypeObject SbkObjectType_Type = {
PyObject_HEAD_INIT(0)
/*ob_size*/ 0,
/*tp_name*/ "Shiboken.ObjectType",
@@ -102,7 +102,7 @@ static PyGetSetDef SbkObjectGetSetList[] = {
};
SbkObjectType SbkObject_Type = { { {
- PyObject_HEAD_INIT(&SbkBaseType_Type)
+ PyObject_HEAD_INIT(&SbkObjectType_Type)
/*ob_size*/ 0,
/*tp_name*/ "Shiboken.Object",
/*tp_basicsize*/ sizeof(SbkObject),
@@ -279,7 +279,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 != &SbkBaseType_Type) {
+ if (type->ob_type != &SbkObjectType_Type) {
continue;
} else {
SbkObjectType* sbkType = reinterpret_cast<SbkObjectType*>(type);
@@ -331,7 +331,7 @@ void init()
if (PyType_Ready(&SbkEnumType_Type) < 0)
Py_FatalError("[libshiboken] Failed to initialise Shiboken.SbkEnumType metatype.");
- if (PyType_Ready(&SbkBaseType_Type) < 0)
+ if (PyType_Ready(&SbkObjectType_Type) < 0)
Py_FatalError("[libshiboken] Failed to initialise Shiboken.BaseWrapperType metatype.");
if (PyType_Ready((PyTypeObject *)&SbkObject_Type) < 0)
@@ -442,7 +442,7 @@ namespace ObjectType
bool checkType(PyTypeObject* type)
{
- return type->ob_type == &SbkBaseType_Type;
+ return type->ob_type == &SbkObjectType_Type;
}
bool isUserType(PyTypeObject* type)
@@ -763,7 +763,7 @@ bool setCppPointer(SbkObject* sbkObj, PyTypeObject* desiredType, void* cptr)
bool isValid(PyObject* pyObj)
{
if (!pyObj || pyObj == Py_None
- || pyObj->ob_type->ob_type != &SbkBaseType_Type
+ || pyObj->ob_type->ob_type != &SbkObjectType_Type
|| ((SbkObject*)pyObj)->d->validCppObject) {
return true;
}
diff --git a/libshiboken/basewrapper.h b/libshiboken/basewrapper.h
index d41e7ea6..460f3159 100644
--- a/libshiboken/basewrapper.h
+++ b/libshiboken/basewrapper.h
@@ -73,7 +73,7 @@ typedef void (*DeleteUserDataFunc)(void*);
typedef void (*ObjectDestructor)(void*);
-extern LIBSHIBOKEN_API PyTypeObject SbkBaseType_Type;
+extern LIBSHIBOKEN_API PyTypeObject SbkObjectType_Type;
extern LIBSHIBOKEN_API SbkObjectType SbkObject_Type;