Skip to content

Commit 9f1d919

Browse files
committed
Restore trashTSSkey silliness.
1 parent 86144fc commit 9f1d919

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Include/internal/pycore_runtime_init.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ extern PyTypeObject _PyExc_MemoryError;
6161
}, \
6262
}, \
6363
}, \
64+
/* A TSS key must be initialized with Py_tss_NEEDS_INIT \
65+
in accordance with the specification. */ \
66+
.autoTSSkey = Py_tss_NEEDS_INIT, \
6467
.parser = _parser_runtime_state_INIT, \
6568
.ceval = { \
6669
.pending_mainthread = { \

Include/internal/pycore_runtime_structs.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ struct pyruntimestate {
223223
struct _pythread_runtime_state threads;
224224
struct _signals_runtime_state signals;
225225

226+
/* Used instead of PyThreadState.trash when there is not current tstate. */
227+
Py_tss_t trashTSSkey;
228+
226229
PyWideStringList orig_argv;
227230

228231
struct _parser_runtime_state parser;

0 commit comments

Comments
 (0)