[libsoup/f17] add a missing annotation to fix usage from python

Daniel Drake dsd at fedoraproject.org
Thu Aug 23 17:05:10 UTC 2012


commit 7d31d9fa9bba13eb9ee8c8e05e246674b9ea9129
Author: Daniel Drake <dsd at laptop.org>
Date:   Thu Aug 23 11:00:38 2012 -0600

    add a missing annotation to fix usage from python

 libsoup-transfer-annotation.patch |   36 ++++++++++++++++++++++++++++++++++++
 libsoup.spec                      |    7 ++++++-
 2 files changed, 42 insertions(+), 1 deletions(-)
---
diff --git a/libsoup-transfer-annotation.patch b/libsoup-transfer-annotation.patch
new file mode 100644
index 0000000..8f0f92a
--- /dev/null
+++ b/libsoup-transfer-annotation.patch
@@ -0,0 +1,36 @@
+From 281ba3f248baba85e3511daea5130ad5e12a6956 Mon Sep 17 00:00:00 2001
+From: Daniel Drake <dsd at laptop.org>
+Date: Thu, 23 Aug 2012 10:04:08 -0600
+Subject: [PATCH] Add missing transfer full annotation to
+ soup_cookie_jar_add_cookie
+
+Adding a cookie to a jar from Python (via introspection) wasn't working
+right, since the cookie was being freed as soon as the python object
+went out of scope, but soup_cookie_jar_add_cookie() explicitly states
+that freeing shouldn't happen.
+
+Add a missing annotation to fix this. Thanks to Benjamin Berg for the
+suggestion.
+
+Fixes http://bugs.sugarlabs.org/ticket/3825
+https://bugzilla.gnome.org/show_bug.cgi?id=682554
+---
+ libsoup/soup-cookie-jar.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libsoup/soup-cookie-jar.c b/libsoup/soup-cookie-jar.c
+index 1f6500f..0e66963 100644
+--- a/libsoup/soup-cookie-jar.c
++++ b/libsoup/soup-cookie-jar.c
+@@ -408,7 +408,7 @@ soup_cookie_jar_get_cookies (SoupCookieJar *jar, SoupURI *uri,
+ /**
+  * soup_cookie_jar_add_cookie:
+  * @jar: a #SoupCookieJar
+- * @cookie: a #SoupCookie
++ * @cookie: (transfer full): a #SoupCookie
+  *
+  * Adds @cookie to @jar, emitting the 'changed' signal if we are modifying
+  * an existing cookie or adding a valid new cookie ('valid' means
+-- 
+1.7.11.4
+
diff --git a/libsoup.spec b/libsoup.spec
index 3cf1ab8..840afc2 100644
--- a/libsoup.spec
+++ b/libsoup.spec
@@ -4,7 +4,7 @@
 
 Name: libsoup
 Version: 2.38.1
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: LGPLv2
 Group: Development/Libraries
 Summary: Soup, an HTTP library implementation
@@ -24,6 +24,7 @@ BuildRequires: gnome-keyring-devel
 BuildRequires: libgnome-keyring-devel
 
 Patch0: libsoup-sync-disconnect.patch
+Patch1: libsoup-transfer-annotation.patch
 
 %description
 Libsoup is an HTTP library implementation in C. It was originally part
@@ -51,6 +52,7 @@ you to develop applications that use the libsoup library.
 %prep
 %setup -q
 %patch0 -p1 -b .sync-disconnect
+%patch1 -p1 -b .transfer-full
 
 %build
 %configure
@@ -84,6 +86,9 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a
 %{_datadir}/gtk-doc/html/%{name}-2.4
 
 %changelog
+* Thu Aug 23 2012 Daniel Drake <dsd at laptop.org> - 2.38.1-3
+- Fix soup_cookie_jar_add_cookie() annotation for use from python
+
 * Thu Jul 19 2012 Dan Winship <danw at redhat.com> - 2.38.1-2
 - Fix a crash in SoupSessionSync (#750036)
 


More information about the scm-commits mailing list