bpo-36710: Pass explicitly tstate in sysmodule.c (GH-14060)

* Replace global var Py_VerboseFlag with interp->config.verbose.
* Add _PyErr_NoMemory(tstate) function.
* Add tstate parameter to _PyEval_SetCoroutineOriginTrackingDepth()
  and move the function to the internal API.
* Replace _PySys_InitMain(runtime, interp)
  with _PySys_InitMain(runtime, tstate).
This commit is contained in:
Victor Stinner 2019-06-13 22:41:23 +02:00 committed by GitHub
parent 3498c642f4
commit 838f26402d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 263 additions and 179 deletions

View file

@ -4728,10 +4728,9 @@ PyEval_SetTrace(Py_tracefunc func, PyObject *arg)
}
void
_PyEval_SetCoroutineOriginTrackingDepth(int new_depth)
_PyEval_SetCoroutineOriginTrackingDepth(PyThreadState *tstate, int new_depth)
{
assert(new_depth >= 0);
PyThreadState *tstate = _PyThreadState_GET();
tstate->coroutine_origin_tracking_depth = new_depth;
}