summaryrefslogtreecommitdiffstats
path: root/Modules/signalmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/signalmodule.c')
-rw-r--r--Modules/signalmodule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index 70f3052..da454de 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -1266,8 +1266,7 @@ PyInit__signal(void)
if (Handlers[SIGINT].func == DefaultHandler) {
/* Install default int handler */
Py_INCREF(IntHandler);
- Py_DECREF(Handlers[SIGINT].func);
- Handlers[SIGINT].func = IntHandler;
+ Py_SETREF(Handlers[SIGINT].func, IntHandler);
old_siginthandler = PyOS_setsig(SIGINT, signal_handler);
}