aboutsummaryrefslogtreecommitdiffstats
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>2012-03-08 16:08:57 -0300
commitcdeb0172eca90f2050313b589fb068145d882dbb (patch)
treee7340214a3df7ebb7386b79751032bffa3576240
parent6c031f64b1e0369d468274be4d3d0107e45fc722 (diff)
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 8e0706bfe..a5446037c 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 67f5fca8a..4990eb190 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 9fdcc456b..0e375cfc2 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 3e42ee86b..c6b936b75 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 d2d1266c2..f6c049b83 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) {