aboutsummaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-09-16 14:27:32 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:17:15 -0300
commitfd5dd85d0d0dcc4faaf3a1ca5bd6a5df857f7844 (patch)
treecbbb5e773dc62b14e5e94e9c6217075ae6a2c41d /generator
parent9785f258d93b4976872a17fbf61bd27a4c4123cd (diff)
Port libsample typesystem and glue codes to Python 3.
Diffstat (limited to 'generator')
-rw-r--r--generator/cppgenerator.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index 8924f7b94..c9e599319 100644
--- a/generator/cppgenerator.cpp
+++ b/generator/cppgenerator.cpp
@@ -2622,8 +2622,7 @@ void CppGenerator::writeClassDefinition(QTextStream& s, const AbstractMetaClass*
s << "// Class Definition -----------------------------------------------" << endl;
s << "extern \"C\" {" << endl;
s << "static SbkObjectType " << className + "_Type" << " = { { {" << endl;
- s << INDENT << "PyObject_HEAD_INIT(&SbkObjectType_Type)" << endl;
- s << INDENT << "/*ob_size*/ 0," << endl;
+ s << INDENT << "PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0)" << endl;
s << INDENT << "/*tp_name*/ \"" << getClassTargetFullName(metaClass) << "\"," << endl;
s << INDENT << "/*tp_basicsize*/ sizeof(SbkObject)," << endl;
s << INDENT << "/*tp_itemsize*/ 0," << endl;