Skip to content

Commit f77a860

Browse files
Move signalmodule.c:is_tripped to _PyRuntimeState.
1 parent eb47a30 commit f77a860

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Include/internal/pycore_signal.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ struct _signals_runtime_state {
6060
#endif
6161
} wakeup;
6262

63+
/* Speed up sigcheck() when none tripped */
64+
_Py_atomic_int is_tripped;
65+
6366
/* True if the main interpreter thread exited due to an unhandled
6467
* KeyboardInterrupt exception, suggesting the user pressed ^C. */
6568
int unhandled_keyboard_interrupt;

Modules/signalmodule.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,7 @@ class sigset_t_converter(CConverter):
102102

103103
#define Handlers _PyRuntime.signals.handlers
104104
#define wakeup _PyRuntime.signals.wakeup
105-
106-
/* Speed up sigcheck() when none tripped */
107-
static _Py_atomic_int is_tripped;
105+
#define is_tripped _PyRuntime.signals.is_tripped
108106

109107
typedef struct {
110108
PyObject *default_handler;

Tools/c-analyzer/cpython/globals-to-fix.tsv

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,6 @@ Modules/_tracemalloc.c - tracemalloc_traces -
411411
Modules/_tracemalloc.c - tracemalloc_domains -
412412
Modules/_tracemalloc.c - tracemalloc_reentrant_key -
413413
Modules/faulthandler.c faulthandler_dump_traceback reentrant -
414-
Modules/signalmodule.c - is_tripped -
415414
Modules/signalmodule.c - signal_global_state -
416415

417416

0 commit comments

Comments
 (0)