r44091 - in /attic/pygtk/debian/patches: 04_Fix_leaks_of_Pango_objects.patch series

aron at users.alioth.debian.org aron at users.alioth.debian.org
Sat Feb 7 04:49:15 UTC 2015


Author: aron
Date: Sat Feb  7 04:49:14 2015
New Revision: 44091

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=44091
Log:
Add upstream patch for #668709

Added:
    attic/pygtk/debian/patches/04_Fix_leaks_of_Pango_objects.patch
Modified:
    attic/pygtk/debian/patches/series

Added: attic/pygtk/debian/patches/04_Fix_leaks_of_Pango_objects.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/attic/pygtk/debian/patches/04_Fix_leaks_of_Pango_objects.patch?rev=44091&op=file
==============================================================================
--- attic/pygtk/debian/patches/04_Fix_leaks_of_Pango_objects.patch	(added)
+++ attic/pygtk/debian/patches/04_Fix_leaks_of_Pango_objects.patch	[utf-8] Sat Feb  7 04:49:14 2015
@@ -0,0 +1,55 @@
+From: "Owen W. Taylor" <otaylor at fishsoup.net>
+Date: Tue, 27 Sep 2011 00:17:52 -0400
+Subject: Fix leaks of Pango objects
+
+Gtk.PrintContext.create_pango_context()
+Gtk.PrintContext.create_pango_layout()
+pangocairo.CairoContext.create_layout()
+
+were leaking the objects they returned.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=660216
+
+Index: pygtk-2.24.0/gtk/gtk-2.10.defs
+===================================================================
+--- pygtk-2.24.0.orig/gtk/gtk-2.10.defs
++++ pygtk-2.24.0/gtk/gtk-2.10.defs
+@@ -1388,12 +1388,14 @@
+ (define-method create_pango_context
+   (of-object "GtkPrintContext")
+   (c-name "gtk_print_context_create_pango_context")
++  (caller-owns-return #t)
+   (return-type "PangoContext*")
+ )
+ 
+ (define-method create_pango_layout
+   (of-object "GtkPrintContext")
+   (c-name "gtk_print_context_create_pango_layout")
++  (caller-owns-return #t)
+   (return-type "PangoLayout*")
+ )
+ 
+Index: pygtk-2.24.0/pangocairo.override
+===================================================================
+--- pygtk-2.24.0.orig/pangocairo.override
++++ pygtk-2.24.0/pangocairo.override
+@@ -118,11 +118,16 @@ _wrap_pango_cairo_update_context(PyGObje
+ static PyObject *
+ _wrap_pango_cairo_create_layout(PyGObject *self)
+ {
+-    PangoLayout *ret;
++    PangoLayout *layout;
++    PyObject *ret;
+ 
+-    ret = pango_cairo_create_layout(PycairoContext_GET(self));
++    layout = pango_cairo_create_layout(PycairoContext_GET(self));
+     /* pygobject_new handles NULL checking */
+-    return pygobject_new((GObject *)ret);
++    ret = pygobject_new((GObject *)layout);
++    if (layout)
++        g_object_unref(layout);
++
++    return ret;
+ }
+ 
+ static PyObject *

Modified: attic/pygtk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/attic/pygtk/debian/patches/series?rev=44091&op=diff
==============================================================================
--- attic/pygtk/debian/patches/series	[utf-8] (original)
+++ attic/pygtk/debian/patches/series	[utf-8] Sat Feb  7 04:49:14 2015
@@ -1,2 +1,3 @@
 01_pygtk-demo.patch
 03_testsuite_filechooser.patch
+04_Fix_leaks_of_Pango_objects.patch




More information about the pkg-gnome-commits mailing list