mirror of
git://slackware.nl/current.git
synced 2024-12-30 10:24:23 +01:00
646a5c1cbf
a/pkgtools-15.0-noarch-13.txz: Rebuilt. installpkg: default line length for --terselength is the number of columns. removepkg: added --terse mode. upgradepkg: default line length for --terselength is the number of columns. upgradepkg: accept -option in addition to --option. ap/vim-8.1.0026-x86_64-1.txz: Upgraded. d/bison-3.0.5-x86_64-1.txz: Upgraded. e/emacs-26.1-x86_64-1.txz: Upgraded. kde/kopete-4.14.3-x86_64-8.txz: Rebuilt. Recompiled against libidn-1.35. n/conntrack-tools-1.4.5-x86_64-1.txz: Upgraded. n/libnetfilter_conntrack-1.0.7-x86_64-1.txz: Upgraded. n/libnftnl-1.1.0-x86_64-1.txz: Upgraded. n/links-2.16-x86_64-2.txz: Rebuilt. Rebuilt to enable X driver for -g mode. n/lynx-2.8.9dev.19-x86_64-1.txz: Upgraded. n/nftables-0.8.5-x86_64-1.txz: Upgraded. n/p11-kit-0.23.11-x86_64-1.txz: Upgraded. n/ulogd-2.0.7-x86_64-1.txz: Upgraded. n/whois-5.3.1-x86_64-1.txz: Upgraded. xap/network-manager-applet-1.8.12-x86_64-1.txz: Upgraded. xap/vim-gvim-8.1.0026-x86_64-1.txz: Upgraded.
63 lines
1.8 KiB
Diff
63 lines
1.8 KiB
Diff
From eca72baa5616fbe4dbebea43c7e5940847dc5ab8 Mon Sep 17 00:00:00 2001
|
|
From: "Owen W. Taylor" <otaylor@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
|
|
---
|
|
gtk/gtk-2.10.defs | 2 ++
|
|
pangocairo.override | 11 ++++++++---
|
|
2 files changed, 10 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/gtk/gtk-2.10.defs b/gtk/gtk-2.10.defs
|
|
index 69c7e0c..faa45e1 100644
|
|
--- a/gtk/gtk-2.10.defs
|
|
+++ b/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*")
|
|
)
|
|
|
|
diff --git a/pangocairo.override b/pangocairo.override
|
|
index bb923e6..5101107 100644
|
|
--- a/pangocairo.override
|
|
+++ b/pangocairo.override
|
|
@@ -118,11 +118,16 @@ _wrap_pango_cairo_update_context(PyGObject *self, PyObject *args, PyObject *kwar
|
|
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 *
|
|
--
|
|
cgit v0.12
|
|
|