summaryrefslogtreecommitdiffstats
path: root/libshiboken
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-10-14 11:25:52 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2011-12-09 20:28:06 -0300
commit2c89e5fb1f324cfe7926e8da2f0eb97a2033fb34 (patch)
tree5667c28a85cf61cd1313d41399da7b3f46243891 /libshiboken
parent1b32cda8e2e2df1004e5bcc3deeef614e1424f53 (diff)
downloadshiboken-2c89e5fb1f324cfe7926e8da2f0eb97a2033fb34.tar.gz
shiboken-2c89e5fb1f324cfe7926e8da2f0eb97a2033fb34.tar.xz
shiboken-2c89e5fb1f324cfe7926e8da2f0eb97a2033fb34.zip
Don't call PyTypeReady on QFlags types in createEnum function, this is done when QFlags types is created.
Diffstat (limited to 'libshiboken')
-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);