summaryrefslogtreecommitdiffstats
path: root/Modules/signalmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-01-07 11:50:04 (GMT)
committerGuido van Rossum <guido@python.org>1995-01-07 11:50:04 (GMT)
commit9558825dad0965520b410a6191f2bfed0b8a2b7a (patch)
tree035d09db7c996badf3ecd4eac1bfea185a5a6d5f /Modules/signalmodule.c
parent3615aaf6c56332e2e74cb8ae9c021dd8710ec945 (diff)
downloadcpython-9558825dad0965520b410a6191f2bfed0b8a2b7a.zip
cpython-9558825dad0965520b410a6191f2bfed0b8a2b7a.tar.gz
cpython-9558825dad0965520b410a6191f2bfed0b8a2b7a.tar.bz2
do not call newmethodobject directly
Diffstat (limited to 'Modules/signalmodule.c')
-rw-r--r--Modules/signalmodule.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index 713afbf..4b81889 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -215,6 +215,7 @@ static PyMethodDef PySignal_methods[] = {
{"signal", PySignal_Signal},
{"getsignal", PySignal_GetSignal},
{"pause", PySignal_Pause},
+ {"default_int_handler", PySignal_CDefaultIntHandler},
{NULL, NULL} /* sentinel */
};
@@ -240,11 +241,8 @@ initsignal()
PySignal_SignalIgnoreHandler = PyInt_FromLong((long)SIG_IGN);
PyDict_SetItemString(d, "SIG_IGN", PySignal_SignalIgnoreHandler);
PyDict_SetItemString(d, "NSIG", PyInt_FromLong((long)NSIG));
- PySignal_DefaultIntHandler = PyCFunction_New("default_int_handler",
- PySignal_CDefaultIntHandler,
- (PyObject *)NULL,
- 0);
- PyDict_SetItemString(d, "default_int_handler", PySignal_DefaultIntHandler);
+ PySignal_DefaultIntHandler =
+ PyDict_GetItemString(d, "default_int_handler");
PySignal_SignalHandlerArray[0].tripped = 0;
for (i = 1; i < NSIG; i++) {