summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libshiboken/sbkenum.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/libshiboken/sbkenum.cpp b/libshiboken/sbkenum.cpp
index 2caae92f..cd34f52e 100644
--- a/libshiboken/sbkenum.cpp
+++ b/libshiboken/sbkenum.cpp
@@ -413,11 +413,8 @@ PyObject* getEnumItemFromValue(PyTypeObject* enumType, long itemValue)
static PyTypeObject* createEnum(const char* fullName, const char* cppName, const char* shortName, PyTypeObject* flagsType)
{
PyTypeObject* enumType = newTypeWithName(fullName, cppName);
- if (flagsType) {
- if (PyType_Ready(flagsType) < 0)
- return 0;
+ if (flagsType)
enumType->tp_as_number = flagsType->tp_as_number;
- }
if (PyType_Ready(enumType) < 0)
return 0;
Shiboken::TypeResolver::createValueTypeResolver<int>(cppName);