summaryrefslogtreecommitdiffstats
path: root/libshiboken/sbkenum.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libshiboken/sbkenum.cpp')
-rw-r--r--libshiboken/sbkenum.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libshiboken/sbkenum.cpp b/libshiboken/sbkenum.cpp
index c2f6ce0c..306ffc8d 100644
--- a/libshiboken/sbkenum.cpp
+++ b/libshiboken/sbkenum.cpp
@@ -41,6 +41,7 @@ extern "C"
struct SbkEnumType
{
PyHeapTypeObject super;
+ SbkConverter** converterPtr;
SbkConverter* converter;
const char* cppName;
};
@@ -533,7 +534,9 @@ PyTypeObject* newTypeWithName(const char* name, const char* cppName)
type->tp_richcompare = &enum_richcompare;
type->tp_hash = &enum_hash;
- reinterpret_cast<SbkEnumType*>(type)->cppName = cppName;
+ SbkEnumType* enumType = reinterpret_cast<SbkEnumType*>(type);
+ enumType->cppName = cppName;
+ enumType->converterPtr = &enumType->converter;
DeclaredEnumTypes::instance().addEnumType(type);
return type;
}