mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 15:48:54 +02:00
cancellable: Connect to cancelled signal using the ID
Avoid fetching the signal-ID by its name since we know it here
This commit is contained in:
@@ -583,10 +583,12 @@ g_cancellable_connect (GCancellable *cancellable,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
id = g_signal_connect_data (cancellable, "cancelled",
|
GClosure *closure;
|
||||||
callback, data,
|
|
||||||
(GClosureNotify) data_destroy_func,
|
closure = g_cclosure_new (callback, data,
|
||||||
G_CONNECT_DEFAULT);
|
(GClosureNotify) data_destroy_func);
|
||||||
|
id = g_signal_connect_closure_by_id (cancellable, signals[CANCELLED],
|
||||||
|
0, closure, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_mutex_unlock (&cancellable->priv->mutex);
|
g_mutex_unlock (&cancellable->priv->mutex);
|
||||||
|
Reference in New Issue
Block a user