summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-11-19 19:01:13 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-11-23 13:37:10 -0200
commit2a3262852ad7f44648624e1c2f20393fa02019da (patch)
tree961a2b669ae4aa886a580ab853b91625efdf06ed
parent04dea49498d185e4be30987e0790c8b45aaef18b (diff)
downloadshiboken-2a3262852ad7f44648624e1c2f20393fa02019da.tar.gz
shiboken-2a3262852ad7f44648624e1c2f20393fa02019da.tar.xz
shiboken-2a3262852ad7f44648624e1c2f20393fa02019da.zip
Renamed some more internal objects and functions.
-rw-r--r--libshiboken/basewrapper.cpp22
-rw-r--r--libshiboken/basewrapper.h4
-rw-r--r--libshiboken/basewrapper_p.h2
-rw-r--r--libshiboken/bindingmanager.cpp4
4 files changed, 16 insertions, 16 deletions
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp
index a19d569c..1afa5529 100644
--- a/libshiboken/basewrapper.cpp
+++ b/libshiboken/basewrapper.cpp
@@ -34,8 +34,8 @@
extern "C"
{
-static void SbkBaseTypeDealloc(PyObject* pyObj);
-static PyObject* SbkBaseTypeTpNew(PyTypeObject* metatype, PyObject* args, PyObject* kwds);
+static void SbkObjectTypeDealloc(PyObject* pyObj);
+static PyObject* SbkObjectTypeTpNew(PyTypeObject* metatype, PyObject* args, PyObject* kwds);
PyTypeObject SbkBaseType_Type = {
PyObject_HEAD_INIT(0)
@@ -43,7 +43,7 @@ PyTypeObject SbkBaseType_Type = {
/*tp_name*/ "Shiboken.ObjectType",
/*tp_basicsize*/ sizeof(SbkObjectType),
/*tp_itemsize*/ 0,
- /*tp_dealloc*/ SbkBaseTypeDealloc,
+ /*tp_dealloc*/ SbkObjectTypeDealloc,
/*tp_print*/ 0,
/*tp_getattr*/ 0,
/*tp_setattr*/ 0,
@@ -76,7 +76,7 @@ PyTypeObject SbkBaseType_Type = {
/*tp_dictoffset*/ 0,
/*tp_init*/ 0,
/*tp_alloc*/ 0,
- /*tp_new*/ SbkBaseTypeTpNew,
+ /*tp_new*/ SbkObjectTypeTpNew,
/*tp_free*/ 0,
/*tp_is_gc*/ 0,
/*tp_bases*/ 0,
@@ -183,7 +183,7 @@ void SbkDeallocWrapperWithPrivateDtor(PyObject* self)
Shiboken::Object::deallocData(sbkObj);
}
-void SbkBaseTypeDealloc(PyObject* pyObj)
+void SbkObjectTypeDealloc(PyObject* pyObj)
{
SbkObjectType* sbkType = reinterpret_cast<SbkObjectType*>(pyObj->ob_type);
if (!sbkType->d)
@@ -199,7 +199,7 @@ void SbkBaseTypeDealloc(PyObject* pyObj)
sbkType->d = 0;
}
-PyObject* SbkBaseTypeTpNew(PyTypeObject* metatype, PyObject* args, PyObject* kwds)
+PyObject* SbkObjectTypeTpNew(PyTypeObject* metatype, PyObject* args, PyObject* kwds)
{
// The meta type creates a new type when the Python programmer extends a wrapped C++ class.
SbkObjectType* newType = reinterpret_cast<SbkObjectType*>(PyType_Type.tp_new(metatype, args, kwds));
@@ -207,12 +207,12 @@ PyObject* SbkBaseTypeTpNew(PyTypeObject* metatype, PyObject* args, PyObject* kwd
if (!newType)
return 0;
- SbkBaseTypePrivate* d = new SbkBaseTypePrivate;
- memset(d, 0, sizeof(SbkBaseTypePrivate));
+ SbkObjectTypePrivate* d = new SbkObjectTypePrivate;
+ memset(d, 0, sizeof(SbkObjectTypePrivate));
std::list<SbkObjectType*> bases = Shiboken::getCppBaseClasses(reinterpret_cast<PyTypeObject*>(newType));
if (bases.size() == 1) {
- SbkBaseTypePrivate* parentType = bases.front()->d;
+ SbkObjectTypePrivate* parentType = bases.front()->d;
d->mi_offsets = parentType->mi_offsets;
d->mi_init = parentType->mi_init;
d->mi_specialcast = parentType->mi_specialcast;
@@ -557,8 +557,8 @@ void setDestructorFunction(SbkObjectType* self, ObjectDestructor func)
void initPrivateData(SbkObjectType* self)
{
- self->d = new SbkBaseTypePrivate;
- memset(self->d, 0, sizeof(SbkBaseTypePrivate));
+ self->d = new SbkObjectTypePrivate;
+ memset(self->d, 0, sizeof(SbkObjectTypePrivate));
}
} // namespace ObjectType
diff --git a/libshiboken/basewrapper.h b/libshiboken/basewrapper.h
index cdc5f484..d41e7ea6 100644
--- a/libshiboken/basewrapper.h
+++ b/libshiboken/basewrapper.h
@@ -77,12 +77,12 @@ extern LIBSHIBOKEN_API PyTypeObject SbkBaseType_Type;
extern LIBSHIBOKEN_API SbkObjectType SbkObject_Type;
-struct SbkBaseTypePrivate;
+struct SbkObjectTypePrivate;
/// PyTypeObject extended with C++ multiple inheritance information.
struct LIBSHIBOKEN_API SbkObjectType
{
PyHeapTypeObject super;
- SbkBaseTypePrivate* d;
+ SbkObjectTypePrivate* d;
};
LIBSHIBOKEN_API PyObject* SbkObjectTpNew(PyTypeObject* subtype, PyObject*, PyObject*);
diff --git a/libshiboken/basewrapper_p.h b/libshiboken/basewrapper_p.h
index 45fdb876..6637e4f7 100644
--- a/libshiboken/basewrapper_p.h
+++ b/libshiboken/basewrapper_p.h
@@ -81,7 +81,7 @@ struct SbkObjectPrivate
};
-struct SbkBaseTypePrivate
+struct SbkObjectTypePrivate
{
int* mi_offsets;
MultipleInheritanceInitFunction mi_init;
diff --git a/libshiboken/bindingmanager.cpp b/libshiboken/bindingmanager.cpp
index f0797042..9f73833c 100644
--- a/libshiboken/bindingmanager.cpp
+++ b/libshiboken/bindingmanager.cpp
@@ -167,7 +167,7 @@ bool BindingManager::hasWrapper(const void* cptr)
void BindingManager::registerWrapper(SbkObject* pyObj, void* cptr)
{
SbkObjectType* instanceType = reinterpret_cast<SbkObjectType*>(pyObj->ob_type);
- SbkBaseTypePrivate* d = instanceType->d;
+ SbkObjectTypePrivate* d = instanceType->d;
if (!d)
return;
@@ -188,7 +188,7 @@ void BindingManager::registerWrapper(SbkObject* pyObj, void* cptr)
void BindingManager::releaseWrapper(SbkObject* sbkObj)
{
SbkObjectType* sbkType = reinterpret_cast<SbkObjectType*>(sbkObj->ob_type);
- SbkBaseTypePrivate* d = sbkType->d;
+ SbkObjectTypePrivate* d = sbkType->d;
int numBases = ((d && d->is_multicpp) ? getNumberOfCppBaseClasses(sbkObj->ob_type) : 1);
void** cptrs = reinterpret_cast<SbkObject*>(sbkObj)->d->cptr;