mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +01:00
gtask: Only override g_task_set_source_tag() for GLib ≥ 2.60
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 b08bd04abe
.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
5ca8e51ae4
commit
bd75c185a1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user