aboutsummaryrefslogtreecommitdiffstats
path: root/libshiboken/basewrapper.cpp
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-11-10 16:35:23 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:08:58 -0300
commit71b34999be9d1f7db63785a13b3ed00b87f3ddd7 (patch)
tree849659d655338b14180bedf0f02cea5d55c3cdc5 /libshiboken/basewrapper.cpp
parentf532843860e96af7f3ce3088ff3ac8ea944d8097 (diff)
Changed signature of cppPointer to receive SbkObject* instead of PyObject*.
Diffstat (limited to 'libshiboken/basewrapper.cpp')
-rw-r--r--libshiboken/basewrapper.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp
index 0214998a7..af61aa007 100644
--- a/libshiboken/basewrapper.cpp
+++ b/libshiboken/basewrapper.cpp
@@ -666,14 +666,13 @@ void releaseOwnership(PyObject* pyObj)
setSequenceOwnership(pyObj, false);
}
-void* cppPointer(PyObject* pyObj, PyTypeObject* desiredType)
+void* cppPointer(SbkObject* pyObj, PyTypeObject* desiredType)
{
- assert(isShibokenType(pyObj));
PyTypeObject* type = pyObj->ob_type;
int idx = 0;
if (reinterpret_cast<SbkObjectType*>(type)->is_multicpp)
idx = getTypeIndexOnHierarchy(type, desiredType);
- return reinterpret_cast<SbkObject*>(pyObj)->d->cptr[idx];
+ return pyObj->d->cptr[idx];
}
bool setCppPointer(SbkObject* sbkObj, PyTypeObject* desiredType, void* cptr)