mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #20440: Massive replacing unsafe attribute setting code with special
macro Py_SETREF.
This commit is contained in:
parent
a198645fa0
commit
5a57ade58e
28 changed files with 92 additions and 120 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue