[glib: 1/2] gsignal: Drop unnecessary warnings from g_signal_lookup()
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] gsignal: Drop unnecessary warnings from g_signal_lookup()
- Date: Mon, 16 Dec 2019 12:41:58 +0000 (UTC)
commit a07bc2055783a245cc281171bf1282d6f1817365
Author: Philip Withnall <withnall endlessm com>
Date: Fri Nov 15 10:42:44 2019 +0000
gsignal: Drop unnecessary warnings from g_signal_lookup()
The `G_TYPE_IS_INSTANTIATABLE()` check is redundant with a precondition
on the function.
The `g_type_class_peek()` check seems like a pointless restriction: it
should be possible to check for a signal from a class init function.
Signed-off-by: Philip Withnall <withnall endlessm com>
Fixes: #650
gobject/gsignal.c | 6 ------
1 file changed, 6 deletions(-)
---
diff --git a/gobject/gsignal.c b/gobject/gsignal.c
index b71bb3837..2b6b0d05b 100644
--- a/gobject/gsignal.c
+++ b/gobject/gsignal.c
@@ -1325,12 +1325,6 @@ g_signal_lookup (const gchar *name,
if (!g_type_name (itype))
g_warning (G_STRLOC ": unable to look up signal \"%s\" for invalid type id '%"G_GSIZE_FORMAT"'",
name, itype);
- else if (!G_TYPE_IS_INSTANTIATABLE (itype))
- g_warning (G_STRLOC ": unable to look up signal \"%s\" for non instantiatable type '%s'",
- name, g_type_name (itype));
- else if (!g_type_class_peek (itype))
- g_warning (G_STRLOC ": unable to look up signal \"%s\" of unloaded type '%s'",
- name, g_type_name (itype));
else if (!is_valid_signal_name (name))
g_warning (G_STRLOC ": unable to look up invalid signal name \"%s\" on type '%s'",
name, g_type_name (itype));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]