diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-11-25 16:49:04 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:12:07 -0300 |
commit | c57ec52139c7aa878341fd0f61133d4472d5fc69 (patch) | |
tree | 51216ae564d3c656b0b762905e538162988e288b | |
parent | 2c2e36a9a58480f7ea0b4f2a7fbc24d0b2e28cdc (diff) |
Cast PySideSignal object to PyObject before calling Py_DECREF.sb-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 07ef83713..013533e90 100644 --- a/generator/cppgenerator.cpp +++ b/generator/cppgenerator.cpp @@ -3044,7 +3044,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; } |