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 100119 - unusual signal names cause trouble
unusual signal names cause trouble
Status: RESOLVED DUPLICATE of bug 93108
Product: glib
Classification: Platform
Component: gobject
2.0.x
Other other
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2002-12-02 11:54 UTC by Matthias Clasen
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthias Clasen 2002-12-02 11:54:04 UTC
using anything but a-zA-Z and - or _ in signal names leads to somewhat unexpected consequences: 
e.g

registering a signal with the name "bad name|or>"

leads to 


g_signal_lookup ("bad name|or>") --> not found
g_signal_lookup ("bad_name_or_") --> 
found
g_signal_lookup ("bad-name-or-") --> found
g_signal_lookup ("bad-name_or-") --> not 
found

I think g_signal_newv should explicitly reject signal_names containing 
anything beyond a-zA-Z and - or _. For - and _ it may be better to normalize
names to _ before 
creating the quark, instead of putting one all-'_' and one variant in the search array, since 
this doesn't cover mixed cases
like my last example.
all-'-'
Comment 1 Matthias Clasen 2002-12-02 12:09:23 UTC
The last sentence should read:

For '-' and '_' it may be better to normalize names to 
'_' before
creating the quark, instead of putting one all-'_' and one all-'-' variant 
in the search array, since this doesn't cover mixed cases
like my last example.
Comment 2 Owen Taylor 2002-12-04 02:08:11 UTC
I think we've decided to handle this by:

 - Documenting the subset we think should work
 - Declaring anything else defined
 - Leaving what currently works currently working

So, I think it can be dup'ed on the doc bug 93108

*** This bug has been marked as a duplicate of 93108 ***