Add missing transfer full annotation to soup_cookie_jar_add_cookie
authorDaniel Drake <dsd@laptop.org>
Thu, 23 Aug 2012 16:04:08 +0000 (10:04 -0600)
committerDaniel Drake <dsd@laptop.org>
Thu, 23 Aug 2012 16:52:38 +0000 (10:52 -0600)
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

index 433e704..3180680 100644 (file)
@@ -432,7 +432,7 @@ soup_cookie_jar_get_cookie_list (SoupCookieJar *jar, SoupURI *uri, gboolean for_
 /**
  * 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
@@ -510,7 +510,7 @@ soup_cookie_jar_add_cookie (SoupCookieJar *jar, SoupCookie *cookie)
  * soup_cookie_jar_add_cookie_with_first_party:
  * @jar: a #SoupCookieJar
  * @first_party: the URI for the main document
- * @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