summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generator/shibokengenerator.cpp2
-rw-r--r--libshiboken/basewrapper.cpp6
-rw-r--r--libshiboken/basewrapper.h3
-rw-r--r--libshiboken/sbkconverter.h4
4 files changed, 4 insertions, 11 deletions
diff --git a/generator/shibokengenerator.cpp b/generator/shibokengenerator.cpp
index 80eaf988..3c889b38 100644
--- a/generator/shibokengenerator.cpp
+++ b/generator/shibokengenerator.cpp
@@ -782,7 +782,7 @@ QString ShibokenGenerator::converterObject(const TypeEntry* type)
if (isCppPrimitive(type))
return QString("Shiboken::Conversions::PrimitiveTypeConverter<%1>()").arg(type->qualifiedCppName());
if (isWrapperType(type))
- return QString("Shiboken::ObjectType::getTypeConverter((SbkObjectType*)%1)").arg(cpythonTypeNameExt(type));
+ return QString("SBK_CONVERTER(%1)").arg(cpythonTypeNameExt(type));
return QString("%1[%2]").arg(convertersVariableName(type->targetLangPackage())).arg(getTypeIndexVariableName(type));
}
diff --git a/libshiboken/basewrapper.cpp b/libshiboken/basewrapper.cpp
index fc83d44c..43ce1de8 100644
--- a/libshiboken/basewrapper.cpp
+++ b/libshiboken/basewrapper.cpp
@@ -727,12 +727,6 @@ void setTypeUserData(SbkObjectType* self, void* userData, DeleteUserDataFunc d_f
self->d->d_func = d_func;
}
-
-SbkConverter* getTypeConverter(SbkObjectType* type)
-{
- return type->d->converter;
-}
-
} // namespace ObjectType
diff --git a/libshiboken/basewrapper.h b/libshiboken/basewrapper.h
index c2539027..e9a94a36 100644
--- a/libshiboken/basewrapper.h
+++ b/libshiboken/basewrapper.h
@@ -210,9 +210,6 @@ LIBSHIBOKEN_API void setSubTypeInitHook(SbkObjectType* self, SubTypeInitH
LIBSHIBOKEN_API void* getTypeUserData(SbkObjectType* self);
LIBSHIBOKEN_API void setTypeUserData(SbkObjectType* self, void* userData, DeleteUserDataFunc d_func);
-/// Returns the converter assigned to the wrapper \p type.
-LIBSHIBOKEN_API SbkConverter* getTypeConverter(SbkObjectType* type);
-
}
namespace Object {
diff --git a/libshiboken/sbkconverter.h b/libshiboken/sbkconverter.h
index a91d14e6..0edd5abb 100644
--- a/libshiboken/sbkconverter.h
+++ b/libshiboken/sbkconverter.h
@@ -242,7 +242,6 @@ LIBSHIBOKEN_API bool checkDictTypes(PyTypeObject* keyType, PyTypeObject* valueTy
/// Returns true if a Python dictionary can be converted to a C++ hash or map.
LIBSHIBOKEN_API bool convertibleDictTypes(SbkConverter* keyConverter, bool keyCheckExact, SbkConverter* valueConverter, bool valueCheckExact, PyObject* pyIn);
-
#define SBK_PY_LONG_LONG_IDX 0
#define SBK_BOOL_IDX 1
#define SBK_CHAR_IDX 2
@@ -283,4 +282,7 @@ template<> inline SbkConverter* PrimitiveTypeConverter<void*>() { return primiti
} } // namespace Shiboken::Conversions
+struct _SbkGenericType { PyHeapTypeObject super; SbkConverter* converter; };
+#define SBK_CONVERTER(objType) (reinterpret_cast<_SbkGenericType*>(objType)->converter)
+
#endif // SBK_CONVERTER_H