summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisenmann <p3732@getgoogleoff.me>2023-04-16 21:46:56 +0200
committerPeter Eisenmann <peter.eisenmann@vigem.de>2023-05-02 13:42:54 +0200
commit467b9177197543bfef8928b7b11439e09bd3068b (patch)
tree71dedf73eb801e784d02edac4d5abd305297e623
parent3abf23b2a7958bbbed44da519bee681651053f9d (diff)
downloadglib-467b9177197543bfef8928b7b11439e09bd3068b.tar.gz
gtimeout: use helper for seconds_full variant
Use timeout_add_full() helper to deduplicate code
-rw-r--r--glib/gmain.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/glib/gmain.c b/glib/gmain.c
index 9d9c123af..b994b59b1 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -5410,21 +5410,7 @@ g_timeout_add_seconds_full (gint priority,
gpointer data,
GDestroyNotify notify)
{
- GSource *source;
- guint id;
-
- g_return_val_if_fail (function != NULL, 0);
-
- source = g_timeout_source_new_seconds (interval);
-
- if (priority != G_PRIORITY_DEFAULT)
- g_source_set_priority (source, priority);
-
- g_source_set_callback (source, function, data, notify);
- id = g_source_attach (source, NULL);
- g_source_unref (source);
-
- return id;
+ return timeout_add_full (priority, interval, TRUE, FALSE, function, data, notify);
}
/**