aboutsummaryrefslogtreecommitdiffstats
path: root/libshiboken/conversions.h
diff options
context:
space:
mode:
Diffstat (limited to 'libshiboken/conversions.h')
-rw-r--r--libshiboken/conversions.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/libshiboken/conversions.h b/libshiboken/conversions.h
index 6247c55d8..8caa56c84 100644
--- a/libshiboken/conversions.h
+++ b/libshiboken/conversions.h
@@ -38,6 +38,7 @@
#include <Python.h>
#include <limits>
#include <memory>
+#include <typeinfo>
#include "pyenum.h"
#include "basewrapper.h"
@@ -119,8 +120,11 @@ struct CppObjectCopier<T, true>
template<typename T>
inline PyObject* createWrapper(const T* cppobj, bool hasOwnership = false, bool isExactType = false)
{
+ const char* typeName = 0;
+ if (!isExactType)
+ typeName = typeid(*const_cast<T*>(cppobj)).name();
return SbkBaseWrapper_New(reinterpret_cast<SbkBaseWrapperType*>(SbkType<T>()),
- const_cast<T*>(cppobj), hasOwnership, isExactType);
+ const_cast<T*>(cppobj), hasOwnership, isExactType, typeName);
}
// Base Conversions ----------------------------------------------------------