mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-05-18 11:41:58 +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:
parent
eedf75e810
commit
7086823bb2
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user