Message354803
| Author |
fabioz |
| Recipients |
fabioz, vstinner |
| Date |
2019年10月16日.16:17:06 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1571242626.68.0.14615334114.issue38500@roundup.psfhosted.org> |
| In-reply-to |
| Content |
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? |
|
History
|
|---|
| 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 |
|