Skip to content

Commit a33bdfc

Browse files
committed
Make the sentinel const instead of changing the C analyzer.
1 parent 407062f commit a33bdfc

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

Python/pystate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3484,7 +3484,7 @@ PyInterpreterView_FromMain(void)
34843484
// thread state was attached.
34853485
// To do this, we just use the memory address of a global variable and
34863486
// cast it to a PyThreadState *.
3487-
static int NO_TSTATE_SENTINEL = 0;
3487+
static const int NO_TSTATE_SENTINEL = 0;
34883488

34893489
PyThreadState *
34903490
PyThreadState_Ensure(PyInterpreterGuard *guard)

Tools/c-analyzer/cpython/ignored.tsv

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,6 @@ Python/pystate.c - _Py_tss_tstate -
198198
Python/pystate.c - _Py_tss_gilstate -
199199
Python/pystate.c - _Py_tss_interp -
200200

201-
# Global sentinel that is fine to share across interpreters
202-
Python/pystate.c - NO_TSTATE_SENTINEL -
203-
204201
##-----------------------
205202
## should be const
206203
# XXX Make them const.

0 commit comments

Comments
 (0)