aboutsummaryrefslogtreecommitdiffstats
path: root/libshiboken
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-03-29 17:32:27 -0300
committerHugo Lima <hugo.lima@openbossa.org>2010-03-30 17:41:39 -0300
commitddd02b6aaf1de46005f7387d5f64f4edde6af7d8 (patch)
treee250195cfb16a3671d1298b4e1039ec3e1fb9182 /libshiboken
parentd3b8a53760ba7c768aaeb547ea541f0806e6e999 (diff)
SbkBaseWrapper_New gets a non-const void pointer instead of a const one.
The motivation is simple, we will change this pointer a lot, so it must not be const.
Diffstat (limited to 'libshiboken')
-rw-r--r--libshiboken/basewrapper.cpp2
-rw-r--r--libshiboken/basewrapper.h2
-rw-r--r--libshiboken/conversions.h4
3 files changed, 4 insertions, 4 deletions
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp
index eb3f24d06..f1af99217 100644
--- a/libshiboken/basewrapper.cpp
+++ b/libshiboken/basewrapper.cpp
@@ -128,7 +128,7 @@ void destroyParentInfo(SbkBaseWrapper* obj, bool removeFromParent)
}
PyObject* SbkBaseWrapper_New(SbkBaseWrapperType* instanceType,
- const void* cptr,
+ void* cptr,
bool hasOwnership,
bool isExactType)
{
diff --git a/libshiboken/basewrapper.h b/libshiboken/basewrapper.h
index 97ce8f10b..f192928a6 100644
--- a/libshiboken/basewrapper.h
+++ b/libshiboken/basewrapper.h
@@ -239,7 +239,7 @@ typedef struct {
LIBSHIBOKEN_API PyAPI_FUNC(PyObject*)
SbkBaseWrapper_New(SbkBaseWrapperType* instanceType,
- const void* cptr,
+ void* cptr,
bool hasOwnership = true,
bool isExactType = false);
diff --git a/libshiboken/conversions.h b/libshiboken/conversions.h
index 35f22d38f..521e5f576 100644
--- a/libshiboken/conversions.h
+++ b/libshiboken/conversions.h
@@ -120,7 +120,7 @@ template<typename T>
inline PyObject* createWrapper(const T* cppobj, bool hasOwnership = false, bool isExactType = false)
{
return SbkBaseWrapper_New(reinterpret_cast<SbkBaseWrapperType*>(SbkType<T>()),
- cppobj, hasOwnership, isExactType);
+ const_cast<T*>(cppobj), hasOwnership, isExactType);
}
// Base Conversions ----------------------------------------------------------
@@ -177,7 +177,7 @@ template<>
struct Converter<void*>
{
static inline bool isConvertible(PyObject* pyobj) { return true; }
- static PyObject* toPython(const void* cppobj)
+ static PyObject* toPython(void* cppobj)
{
if (!cppobj)
Py_RETURN_NONE;