mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
bpo-43268: _Py_IsMainInterpreter() now expects interp (GH-24577)
The _Py_IsMainInterpreter() function now expects interp rather than tstate.
This commit is contained in:
parent
62078101ea
commit
101bf69ff1
9 changed files with 15 additions and 15 deletions
|
@ -22,11 +22,11 @@ _Py_IsMainThread(void)
|
|||
|
||||
|
||||
static inline int
|
||||
_Py_IsMainInterpreter(PyThreadState* tstate)
|
||||
_Py_IsMainInterpreter(PyInterpreterState *interp)
|
||||
{
|
||||
/* Use directly _PyRuntime rather than tstate->interp->runtime, since
|
||||
this function is used in performance critical code path (ceval) */
|
||||
return (tstate->interp == _PyRuntime.interpreters.main);
|
||||
return (interp == _PyRuntime.interpreters.main);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue