summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-10-21 17:36:06 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2011-12-09 19:25:36 -0300
commitc6e8f512c4f1c8bf9768d4b262b49ae1293c66db (patch)
tree83ce7b7d074f8202b8a0df6a01dbc9399f815564
parentc1a0865b2abbf8dd19fc1e51b73288d93b5c8d0f (diff)
downloadpyside-c6e8f512c4f1c8bf9768d4b262b49ae1293c66db.tar.gz
pyside-c6e8f512c4f1c8bf9768d4b262b49ae1293c66db.tar.xz
pyside-c6e8f512c4f1c8bf9768d4b262b49ae1293c66db.zip
Modified PySideQFlags based on Hugo's design.
-rw-r--r--libpyside/pysideqflags.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libpyside/pysideqflags.cpp b/libpyside/pysideqflags.cpp
index 8e962da..4fe24b8 100644
--- a/libpyside/pysideqflags.cpp
+++ b/libpyside/pysideqflags.cpp
@@ -33,6 +33,7 @@ extern "C" {
struct PySideQFlagsType
{
PyHeapTypeObject super;
+ SbkConverter** converterPtr;
SbkConverter* converter;
};
@@ -127,6 +128,9 @@ namespace QFlags
type->tp_as_number = numberMethods;
type->tp_richcompare = &PySideQFlagsRichCompare;
+ PySideQFlagsType* flagsType = reinterpret_cast<PySideQFlagsType*>(type);
+ flagsType->converterPtr = &flagsType->converter;
+
if (PyType_Ready(type) < 0)
return 0;
@@ -146,4 +150,3 @@ namespace QFlags
}
}
}
-