bpo-38500: Add _PyInterpreterState_SetEvalFrameFunc() (GH-17340)

PyInterpreterState.eval_frame function now requires a tstate (Python
thread state) parameter.

Add private functions to the C API to get and set the frame
evaluation function:

* Add tstate parameter to _PyFrameEvalFunction function type.
* Add _PyInterpreterState_GetEvalFrameFunc() and
  _PyInterpreterState_SetEvalFrameFunc() functions.
* Add tstate parameter to _PyEval_EvalFrameDefault().
This commit is contained in:
Victor Stinner 2020-03-12 23:18:39 +01:00 committed by GitHub
parent c846ef004d
commit 0b72b23fb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 67 additions and 13 deletions

View file

@ -54,8 +54,6 @@ struct _ceval_runtime_state {
/* interpreter state */
typedef PyObject* (*_PyFrameEvalFunction)(struct _frame *, int);
#define _PY_NSMALLPOSINTS 257
#define _PY_NSMALLNEGINTS 5