summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-11-10 14:36:07 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-11-10 15:36:29 -0200
commit50fae8be6d673c56a10cd414e9f7da1a5151b062 (patch)
tree40fef1af0e48c461ac6a5d52c8f3a7e807db9eb1
parent7090a14a3412af1d857d3a995dfdb7e575ebf22a (diff)
downloadshiboken-50fae8be6d673c56a10cd414e9f7da1a5151b062.tar.gz
shiboken-50fae8be6d673c56a10cd414e9f7da1a5151b062.tar.xz
shiboken-50fae8be6d673c56a10cd414e9f7da1a5151b062.zip
Variable SbkBaseWrapperType_Type renamed to SbkObjectType_Type
-rw-r--r--generator/cppgenerator.cpp2
-rw-r--r--generator/shibokengenerator.cpp2
-rw-r--r--libshiboken/basewrapper.cpp10
-rw-r--r--libshiboken/basewrapper.h4
-rw-r--r--tests/samplebinding/typesystem_sample.xml2
5 files changed, 10 insertions, 10 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index 8e0706bf..a5446037 100644
--- a/generator/cppgenerator.cpp
+++ b/generator/cppgenerator.cpp
@@ -2426,7 +2426,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(&SbkBaseWrapperType_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/generator/shibokengenerator.cpp b/generator/shibokengenerator.cpp
index 67f5fca8..4990eb19 100644
--- a/generator/shibokengenerator.cpp
+++ b/generator/shibokengenerator.cpp
@@ -598,7 +598,7 @@ QString ShibokenGenerator::cpythonBaseName(const TypeEntry* type)
{
QString baseName;
if ((type->isObject() || type->isValue() || type->isNamespace())) { // && !type->isReference()) {
- baseName = QString("Sbk") + type->name();
+ baseName = "Sbk_" + type->name();
} else if (type->isPrimitive()) {
const PrimitiveTypeEntry* ptype = (const PrimitiveTypeEntry*) type;
while (ptype->basicAliasedTypeEntry())
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp
index 9fdcc456..0e375cfc 100644
--- a/libshiboken/basewrapper.cpp
+++ b/libshiboken/basewrapper.cpp
@@ -36,7 +36,7 @@ extern "C"
static void SbkObjectTypeDealloc(PyObject* pyObj);
static PyObject* SbkObjectTypeTpNew(PyTypeObject* metatype, PyObject* args, PyObject* kwds);
-PyTypeObject SbkBaseWrapperType_Type = {
+PyTypeObject SbkObjectType_Type = {
PyObject_HEAD_INIT(0)
/*ob_size*/ 0,
/*tp_name*/ "Shiboken.ObjectType",
@@ -101,7 +101,7 @@ static PyGetSetDef SbkObjectGetSetList[] = {
};
SbkObjectType SbkObject_Type = { { {
- PyObject_HEAD_INIT(&SbkBaseWrapperType_Type)
+ PyObject_HEAD_INIT(&SbkObjectType_Type)
/*ob_size*/ 0,
/*tp_name*/ "Shiboken.Object",
/*tp_basicsize*/ sizeof(SbkObject),
@@ -387,7 +387,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 != &SbkBaseWrapperType_Type) {
+ if (type->ob_type != &SbkObjectType_Type) {
continue;
} else {
SbkObjectType* sbkType = reinterpret_cast<SbkObjectType*>(type);
@@ -494,7 +494,7 @@ void initShiboken()
if (PyType_Ready(&SbkEnumType_Type) < 0)
Py_FatalError("[libshiboken] Failed to initialise Shiboken.SbkEnumType metatype.");
- if (PyType_Ready(&SbkBaseWrapperType_Type) < 0)
+ if (PyType_Ready(&SbkObjectType_Type) < 0)
Py_FatalError("[libshiboken] Failed to initialise Shiboken.BaseWrapperType metatype.");
if (PyType_Ready((PyTypeObject *)&SbkObject_Type) < 0)
@@ -689,7 +689,7 @@ bool setCppPointer(SbkObject* sbkObj, PyTypeObject* desiredType, void* cptr)
bool isValid(PyObject* pyObj)
{
if (!pyObj || pyObj == Py_None
- || pyObj->ob_type->ob_type != &SbkBaseWrapperType_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 3e42ee86..c6b936b7 100644
--- a/libshiboken/basewrapper.h
+++ b/libshiboken/basewrapper.h
@@ -71,7 +71,7 @@ typedef bool (*ExtendedIsConvertibleFunc)(PyObject*);
// Used in userdata dealloc function
typedef void (*DeleteUserDataFunc)(void*);
-extern LIBSHIBOKEN_API PyTypeObject SbkBaseWrapperType_Type;
+extern LIBSHIBOKEN_API PyTypeObject SbkObjectType_Type;
extern LIBSHIBOKEN_API SbkObjectType SbkObject_Type;
/// PyTypeObject extended with C++ multiple inheritance information.
@@ -138,7 +138,7 @@ LIBSHIBOKEN_API void destroyParentInfo(SbkObject* obj, bool removeFromParent = t
*/
inline bool isShibokenType(PyObject*& pyObj)
{
- return pyObj->ob_type->ob_type == &SbkBaseWrapperType_Type;
+ return pyObj->ob_type->ob_type == &SbkObjectType_Type;
}
/**
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml
index d2d1266c..f6c049b8 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -1114,7 +1114,7 @@
<add-function signature="__setitem__" >
<inject-code class="target" position="beginning">
PyObject* args = Py_BuildValue("(iO)", _i, _value);
- PyObject* result = SbkStrFunc_set_char(self, args);
+ PyObject* result = Sbk_StrFunc_set_char(self, args);
Py_DECREF(args);
int ok = result == Py_True;
if (result) {