aboutsummaryrefslogtreecommitdiffstats
path: root/cppgenerator.cpp
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-04-01 18:10:37 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2010-04-05 18:39:52 -0300
commit319e5f2467e8682865f1206ae4ce4b3e2bdff147 (patch)
tree32ec9d4d6ba9c0b4e509db1e24043386cdc496fe /cppgenerator.cpp
parent9a5e72d08f908183d7bf8abcb3546cf509f9362d (diff)
Added enum meta type, this will ease you to known if a PyObject is a Shiboken enum.
Diffstat (limited to 'cppgenerator.cpp')
-rw-r--r--cppgenerator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp
index 388d45e96..c1881a44f 100644
--- a/cppgenerator.cpp
+++ b/cppgenerator.cpp
@@ -2441,7 +2441,7 @@ void CppGenerator::writeEnumDefinition(QTextStream& s, const AbstractMetaEnum* c
s << "static PyObject* " << newFunc << "(PyTypeObject*, PyObject*, PyObject*);" << endl << endl;
s << "static PyTypeObject " << cpythonName << "_Type = {" << endl;
- s << INDENT << "PyObject_HEAD_INIT(&PyType_Type)" << endl;
+ s << INDENT << "PyObject_HEAD_INIT(&Shiboken::SbkEnumType_Type)" << endl;
s << INDENT << "/*ob_size*/ 0," << endl;
s << INDENT << "/*tp_name*/ \"" << cppEnum->name() << "\"," << endl;
s << INDENT << "/*tp_basicsize*/ sizeof(Shiboken::SbkEnumObject)," << endl;