diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-11-25 16:49:04 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-11-25 16:57:12 -0300 |
commit | c4f7eab58b94fdbc934994aca0d0cfff9e8bbe13 (patch) | |
tree | 863edf14a3833f16f819c675822665b99c04f90a | |
parent | 907842acf4baa9e520431157bf1b0293476d65c3 (diff) | |
download | shiboken-c4f7eab58b94fdbc934994aca0d0cfff9e8bbe13.tar.gz shiboken-c4f7eab58b94fdbc934994aca0d0cfff9e8bbe13.tar.xz shiboken-c4f7eab58b94fdbc934994aca0d0cfff9e8bbe13.zip |
Cast PySideSignal object to PyObject before calling Py_DECREF.1.0.0-beta1
This is done because the Py_DECREF macro from Python 2.5 doesn't
cast the argument to "PyObject*" as 2.6 does. This is a problem
for PySideSignal objects, for this struct is private, having only
the forward declaration visible.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Renato Araújo <renato.filho@openbossa.org>
-rw-r--r-- | generator/cppgenerator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp index f4a4918e..11135c82 100644 --- a/generator/cppgenerator.cpp +++ b/generator/cppgenerator.cpp @@ -3042,7 +3042,7 @@ void CppGenerator::writeSignalInitialization(QTextStream& s, const AbstractMetaC s << ", NULL);" << endl; s << INDENT << "PySide::Signal::addSignalToWrapper(&" + cpythonTypeName(metaClass) + ", \""; s << funcName << "\", signal_item);" << endl; - s << INDENT << "Py_DECREF(signal_item);" << endl; + s << INDENT << "Py_DECREF((PyObject*) signal_item);" << endl; } s << endl; } |