summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Griffis <pgriffis@igalia.com>2020-11-13 13:04:52 -0600
committerPatrick Griffis <pgriffis@igalia.com>2020-11-13 13:04:52 -0600
commit5a63959d45681a0f49860e5aa49926061383427e (patch)
tree29bfbf0305492bf85d61509bd017212030831e3a
parent5a61da0b51c019296525f06038c5ccc039dfe210 (diff)
downloadlibsoup-5a63959d45681a0f49860e5aa49926061383427e.tar.gz
Change soup_add_completion() to not return a GSource
This was an unref'd source that confused some static analysis.
-rw-r--r--libsoup/soup-misc.c11
-rw-r--r--libsoup/soup-misc.h2
2 files changed, 4 insertions, 9 deletions
diff --git a/libsoup/soup-misc.c b/libsoup/soup-misc.c
index fb58ad30..a8a4d19f 100644
--- a/libsoup/soup-misc.c
+++ b/libsoup/soup-misc.c
@@ -67,7 +67,7 @@ soup_add_completion_reffed (GMainContext *async_context,
return source;
}
-/**
+/*
* soup_add_completion: (skip)
* @async_context: (allow-none): the #GMainContext to dispatch the I/O
* watch in, or %NULL for the default context
@@ -78,12 +78,8 @@ soup_add_completion_reffed (GMainContext *async_context,
* default priority. Use this when you want to complete an action in
* @async_context's main loop, as soon as possible.
*
- * Return value: a #GSource, which can be removed from @async_context
- * with g_source_destroy().
- *
- * Since: 2.24
- **/
-GSource *
+ */
+void
soup_add_completion (GMainContext *async_context,
GSourceFunc function, gpointer data)
{
@@ -91,7 +87,6 @@ soup_add_completion (GMainContext *async_context,
source = soup_add_completion_reffed (async_context, function, data, NULL);
g_source_unref (source);
- return source;
}
/**
diff --git a/libsoup/soup-misc.h b/libsoup/soup-misc.h
index 1efdd6d0..f10b80ad 100644
--- a/libsoup/soup-misc.h
+++ b/libsoup/soup-misc.h
@@ -13,7 +13,7 @@
G_BEGIN_DECLS
/* Non-default-GMainContext operations */
-GSource *soup_add_completion (GMainContext *async_context,
+void soup_add_completion (GMainContext *async_context,
GSourceFunc function,
gpointer data);
GSource *soup_add_timeout (GMainContext *async_context,