Message354803
In CPython 3.7 it was possible to do:
#include "pystate.h"
...
PyThreadState *ts = PyThreadState_Get();
PyInterpreterState *interp = ts->interp;
interp->eval_frame = my_frame_eval_func;
This is no longer possible because in 3.8 the PyInterpreterState is opaque, so, Py_BUILD_CORE_MODULE needs to be defined defined and "internal/pycore_pystate.h" must be included to set PyInterpreterState.eval_frame.
This works but isn't ideal -- maybe there could be a function to set PyInterpreterState.eval_frame? |
|
Date |
User |
Action |
Args |
2019-10-16 16:17:06 | fabioz | set | recipients:
+ fabioz, vstinner |
2019-10-16 16:17:06 | fabioz | set | messageid: <1571242626.68.0.14615334114.issue38500@roundup.psfhosted.org> |
2019-10-16 16:17:06 | fabioz | link | issue38500 messages |
2019-10-16 16:17:06 | fabioz | create | |
|