bpo-43268: _Py_IsMainInterpreter() now expects interp (GH-24577)
The _Py_IsMainInterpreter() function now expects interp rather than
tstate.
diff --git a/Objects/longobject.c b/Objects/longobject.c
index 240e92a..c0b4ce0 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -5719,7 +5719,7 @@ _PyLong_Init(PyThreadState *tstate)
tstate->interp->small_ints[i] = v;
}
- if (_Py_IsMainInterpreter(tstate)) {
+ if (_Py_IsMainInterpreter(tstate->interp)) {
/* initialize int_info */
if (Int_InfoType.tp_name == NULL) {
if (PyStructSequence_InitType2(&Int_InfoType, &int_info_desc) < 0) {
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 3498f0d..9dbb7be 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -286,7 +286,7 @@ void
_PyType_Fini(PyThreadState *tstate)
{
_PyType_ClearCache(&tstate->interp->type_cache);
- if (_Py_IsMainInterpreter(tstate)) {
+ if (_Py_IsMainInterpreter(tstate->interp)) {
clear_slotdefs();
}
}
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 64fd408..498f393 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -15701,7 +15701,7 @@ _PyUnicode_Init(PyThreadState *tstate)
return _PyStatus_NO_MEMORY();
}
- if (_Py_IsMainInterpreter(tstate)) {
+ if (_Py_IsMainInterpreter(tstate->interp)) {
/* initialize the linebreak bloom filter */
bloom_linebreak = make_bloom_mask(
PyUnicode_2BYTE_KIND, linebreak,