mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-39947: Add PyInterpreterState_Get() function (GH-18979)
* Rename _PyInterpreterState_Get() to PyInterpreterState_Get() and move it the limited C API. * Add _PyInterpreterState_Get() alias to PyInterpreterState_Get() for backward compatibility with Python 3.8.
This commit is contained in:
parent
ff4584caca
commit
be79373a78
8 changed files with 35 additions and 14 deletions
|
|
@ -635,7 +635,7 @@ subprocess_fork_exec(PyObject* self, PyObject *args)
|
|||
return NULL;
|
||||
|
||||
if ((preexec_fn != Py_None) &&
|
||||
(_PyInterpreterState_Get() != PyInterpreterState_Main())) {
|
||||
(PyInterpreterState_Get() != PyInterpreterState_Main())) {
|
||||
PyErr_SetString(PyExc_RuntimeError,
|
||||
"preexec_fn not supported within subinterpreters");
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue