[New-bugs-announce] [issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals
Fabio Zadrozny
report at bugs.python.org
Wed Oct 16 12:17:06 EDT 2019
New submission from Fabio Zadrozny <fabioz at users.sourceforge.net>:
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?
----------
components: Interpreter Core
messages: 354803
nosy: fabioz, vstinner
priority: normal
severity: normal
status: open
title: Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals
type: enhancement
versions: Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38500>
_______________________________________
More information about the New-bugs-announce
mailing list