diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2010-03-29 17:32:27 -0300 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-03-30 17:41:39 -0300 |
commit | ddd02b6aaf1de46005f7387d5f64f4edde6af7d8 (patch) | |
tree | e250195cfb16a3671d1298b4e1039ec3e1fb9182 /libshiboken/conversions.h | |
parent | d3b8a53760ba7c768aaeb547ea541f0806e6e999 (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/conversions.h')
-rw-r--r-- | libshiboken/conversions.h | 4 |
1 files changed, 2 insertions, 2 deletions
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; |