summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-11-25 16:49:04 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-11-25 16:57:12 -0300
commitc4f7eab58b94fdbc934994aca0d0cfff9e8bbe13 (patch)
tree863edf14a3833f16f819c675822665b99c04f90a
parent907842acf4baa9e520431157bf1b0293476d65c3 (diff)
downloadshiboken-1.0.0-beta1.tar.gz
shiboken-1.0.0-beta1.tar.xz
shiboken-1.0.0-beta1.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.cpp2
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;
}