After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 668269 - gsignal: add g_signal_handlers_disconnect_by_data
gsignal: add g_signal_handlers_disconnect_by_data
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gobject
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 668279
 
 
Reported: 2012-01-19 14:43 UTC by Allison Karlitskaya (desrt)
Modified: 2012-01-20 18:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gsignal: add g_signal_handlers_disconnect_by_data (1.41 KB, patch)
2012-01-19 14:43 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Allison Karlitskaya (desrt) 2012-01-19 14:43:50 UTC
This is obviously useful, but potentially dangerous because you could
inadvertently remove other people's connections.  Its use is safe in at
least these two cases:

 1) When either the source or target is a private pointer and you are
    therefore sure that nobody else has hooked up anything between them.

 2) When finalizing the target, because if any signal handlers are left
    past this point then you're already in undefined behaviour territory.
Comment 1 Allison Karlitskaya (desrt) 2012-01-19 14:43:52 UTC
Created attachment 205625 [details] [review]
gsignal: add g_signal_handlers_disconnect_by_data

Similar to g_signal_handlers_disconnect_by_func() but disconnects all
functions that use the given user_data.