From bd75c185a1393d001a9ac357b9e1e72e9f5c028f Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 15 Jul 2020 17:07:12 +0100 Subject: [PATCH] =?UTF-8?q?gtask:=20Only=20override=20g=5Ftask=5Fset=5Fsou?= =?UTF-8?q?rce=5Ftag()=20for=20GLib=20=E2=89=A5=202.60?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit g_task_set_name() was added in GLib 2.60, so only use it in the overridden definition of g_task_set_source_tag() if the user has said that they require GLib ≥ 2.60. This is a follow up to commit b08bd04abe0d031fb7baa4. Signed-off-by: Philip Withnall --- gio/gtask.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gio/gtask.h b/gio/gtask.h index 08ed7be72..bc6454a25 100644 --- a/gio/gtask.h +++ b/gio/gtask.h @@ -79,12 +79,14 @@ void g_task_set_name (GTask *task, const gchar *name); /* Macro wrapper to set the task name when setting the source tag. */ +#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_60 #define g_task_set_source_tag(task, tag) G_STMT_START { \ GTask *_task = (task); \ (g_task_set_source_tag) (_task, tag); \ if (g_task_get_name (_task) == NULL) \ g_task_set_name (_task, G_STRINGIFY (tag)); \ } G_STMT_END +#endif GLIB_AVAILABLE_IN_2_36 gpointer g_task_get_source_object (GTask *task);