mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 14:36:13 +01:00
Improve the warning if G_SIGNAL_NO_HOOKS is set. (#154299, Nickolay V.
2004-10-04 Matthias Clasen <mclasen@redhat.com> * gsignal.c (g_signal_add_emission_hook): Improve the warning if G_SIGNAL_NO_HOOKS is set. (#154299, Nickolay V. Shmyrev)
This commit is contained in:
parent
8dc560a739
commit
ca4e234113
@ -1,3 +1,8 @@
|
||||
2004-10-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gsignal.c (g_signal_add_emission_hook): Improve the warning
|
||||
if G_SIGNAL_NO_HOOKS is set. (#154299, Nickolay V. Shmyrev)
|
||||
|
||||
2004-09-22 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* Makefile.am (install-libtool-import-lib): [Win32] Add code to
|
||||
|
@ -825,12 +825,18 @@ g_signal_add_emission_hook (guint signal_id,
|
||||
|
||||
SIGNAL_LOCK ();
|
||||
node = LOOKUP_SIGNAL_NODE (signal_id);
|
||||
if (!node || node->destroyed || (node->flags & G_SIGNAL_NO_HOOKS))
|
||||
if (!node || node->destroyed)
|
||||
{
|
||||
g_warning ("%s: invalid signal id `%u'", G_STRLOC, signal_id);
|
||||
SIGNAL_UNLOCK ();
|
||||
return 0;
|
||||
}
|
||||
if (node->flags & G_SIGNAL_NO_HOOKS)
|
||||
{
|
||||
g_warning ("%s: signal id `%u' does not support emission hooks (G_SIGNAL_NO_HOOKS flag set)", G_STRLOC, signal_id);
|
||||
SIGNAL_UNLOCK ();
|
||||
return 0;
|
||||
}
|
||||
if (detail && !(node->flags & G_SIGNAL_DETAILED))
|
||||
{
|
||||
g_warning ("%s: signal id `%u' does not support detail (%u)", G_STRLOC, signal_id, detail);
|
||||
|
Loading…
Reference in New Issue
Block a user