summaryrefslogtreecommitdiffstats
path: root/libshiboken/conversions.h
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/conversions.h
parentd3b8a53760ba7c768aaeb547ea541f0806e6e999 (diff)
downloadshiboken-ddd02b6aaf1de46005f7387d5f64f4edde6af7d8.tar.gz
shiboken-ddd02b6aaf1de46005f7387d5f64f4edde6af7d8.tar.xz
shiboken-ddd02b6aaf1de46005f7387d5f64f4edde6af7d8.zip
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/conversions.h')
-rw-r--r--libshiboken/conversions.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libshiboken/conversions.h b/libshiboken/conversions.h
index 35f22d38..521e5f57 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;