mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
gh-106320: Use _PyInterpreterState_GET() (#106336)
Replace PyInterpreterState_Get() with inlined _PyInterpreterState_GET().
This commit is contained in:
parent
9a51a41961
commit
bc7eb17084
11 changed files with 34 additions and 35 deletions
|
|
@ -1025,7 +1025,7 @@ subprocess_fork_exec_impl(PyObject *module, PyObject *process_args,
|
|||
int *c_fds_to_keep = NULL;
|
||||
Py_ssize_t fds_to_keep_len = PyTuple_GET_SIZE(py_fds_to_keep);
|
||||
|
||||
PyInterpreterState *interp = PyInterpreterState_Get();
|
||||
PyInterpreterState *interp = _PyInterpreterState_GET();
|
||||
if ((preexec_fn != Py_None) && interp->finalizing) {
|
||||
PyErr_SetString(PyExc_RuntimeError,
|
||||
"preexec_fn not supported at interpreter shutdown");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue