GNOME Bugzilla – Bug 540376
No TypeError raised when type is None
Last modified: 2008-08-11 20:31:19 UTC
AFAICT, the following code ought to raise a TypeError because type is None. gobject.signal_new('test', None, 0, gobject.TYPE_NONE, (gobject.TYPE_LONG,)) Instead, it prints warnings and raises a RuntimeError which is not quite as good.
Created attachment 115744 [details] [review] simple check patch
Comment on attachment 115744 [details] [review] simple check patch Misses test. But the rest looks good, I think.
Committed the patch and the test above. Sending ChangeLog Sending gobject/gobjectmodule.c Sending tests/test_signal.py Transmitting file data ... Committed revision 942. 2008-08-11 Paul Pogonyshev <pogonyshev@gmx.net> Bug 540376 – No TypeError raised when type is None * gobject/gobjectmodule.c (pyg_signal_new): Add check on second argument type. * tests/test_signal.py (TestSignalCreation): New test case.