r11868 - in /desktop/unstable/pygtk/debian: changelog patches/60_missing-codegen-fixes.patch
lool at users.alioth.debian.org
lool at users.alioth.debian.org
Tue Jul 10 11:44:19 UTC 2007
Author: lool
Date: Tue Jul 10 11:44:18 2007
New Revision: 11868
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=11868
Log:
* New patch, 60_missing-codegen-fixes, fixes TypeError crashes in misc apps
such as gnome-sudoku and deskbar-applet which were due to an incomplete
backport of a codegen change; GNOME #455468.
Added:
desktop/unstable/pygtk/debian/patches/60_missing-codegen-fixes.patch
Modified:
desktop/unstable/pygtk/debian/changelog
Modified: desktop/unstable/pygtk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/pygtk/debian/changelog?rev=11868&op=diff
==============================================================================
--- desktop/unstable/pygtk/debian/changelog (original)
+++ desktop/unstable/pygtk/debian/changelog Tue Jul 10 11:44:18 2007
@@ -1,3 +1,11 @@
+pygtk (2.10.5-2) unstable; urgency=high
+
+ * New patch, 60_missing-codegen-fixes, fixes TypeError crashes in misc apps
+ such as gnome-sudoku and deskbar-applet which were due to an incomplete
+ backport of a codegen change; GNOME #455468.
+
+ -- Loic Minier <lool at dooz.org> Tue, 10 Jul 2007 13:25:26 +0200
+
pygtk (2.10.5-1) unstable; urgency=low
* New upstream stable release; bug fixes.
Added: desktop/unstable/pygtk/debian/patches/60_missing-codegen-fixes.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/pygtk/debian/patches/60_missing-codegen-fixes.patch?rev=11868&op=file
==============================================================================
--- desktop/unstable/pygtk/debian/patches/60_missing-codegen-fixes.patch (added)
+++ desktop/unstable/pygtk/debian/patches/60_missing-codegen-fixes.patch Tue Jul 10 11:44:18 2007
@@ -1,0 +1,52 @@
+GNOME #455468; fixes TypeError crashes in misc apps such as gnome-sudoku and
+deskbar-applet which were due to an incomplete backport of a codegen change.
+
+2007-07-11 Gustavo J. A. M. Carneiro <gjc at inescporto.pt>
+
+ Backport from trunk:
+
+ * codegen/reversewrapper.py (ReverseWrapper.generate): Special
+ case when only a single void return value exists; fix the return
+ value type checking in this case.
+
+Index: codegen/reversewrapper.py
+===================================================================
+--- codegen/reversewrapper.py (revision 2837)
++++ codegen/reversewrapper.py (revision 2838)
+@@ -291,17 +291,25 @@ class ReverseWrapper(object):
+
+ sink.indent()
+
+- if len(self.pyret_parse_items) == 1:
+- ## if retval is one item only, pack it in a tuple so we
+- ## can use PyArg_ParseTuple as usual..
+- self.write_code('py_retval = Py_BuildValue("(N)", py_retval);')
+- if len(self.pyret_parse_items) > 0:
+- ## Parse return values using PyArg_ParseTuple
+- params = ["py_retval",
+- '"%s"' % "".join([format for format, param in self.pyret_parse_items])]
+- params.extend([param for format, param in self.pyret_parse_items if param])
+- self.write_code(code=None, failure_expression=(
+- '!PyArg_ParseTuple(%s)' % (', '.join(params),)))
++ if self.pyret_parse_items == [("", "")]:
++ ## special case when there are no return parameters
++ self.write_code(
++ code=None,
++ failure_expression='py_retval != Py_None',
++ failure_exception=('PyErr_SetString(PyExc_TypeError, '
++ '"virtual method should return None");'))
++ else:
++ if len(self.pyret_parse_items) == 1:
++ ## if retval is one item only, pack it in a tuple so we
++ ## can use PyArg_ParseTuple as usual..
++ self.write_code('py_retval = Py_BuildValue("(N)", py_retval);')
++ if len(self.pyret_parse_items) > 0:
++ ## Parse return values using PyArg_ParseTuple
++ params = ["py_retval",
++ '"%s"' % "".join([format for format, param in self.pyret_parse_items])]
++ params.extend([param for format, param in self.pyret_parse_items if param])
++ self.write_code(code=None, failure_expression=(
++ '!PyArg_ParseTuple(%s)' % (', '.join(params),)))
+
+ if DEBUG_MODE:
+ self.declarations.writeln("/* end declarations */")
More information about the pkg-gnome-commits
mailing list