[issue46836] [C API] Move PyFrameObject to the internal C API

STINNER Victor report at bugs.python.org
Wed Feb 23 14:48:12 EST 2022


STINNER Victor <vstinner at python.org> added the comment:

Stefan Behnel:
> I haven't looked fully into this yet, but I *think* that Cython can get rid of most of the direct usages of PyFrameObject by switching to the new InterpreterFrame struct instead. It looks like the important fields have now been moved over to that.

InterpreterFrame is part of the internal C API. As I wrote, IMO it's fine for now that Cython uses the internal C API.

> That won't improve the situation regarding the usage of CPython internals, but it's probably worth keeping in mind before we start adding new API functions that work on frame objects.

Right.

My hope is also that making the structure internal should help to identify which members should be exposed with getter functions, or even setter functions (Mark would prefer to no add setter functions).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46836>
_______________________________________


More information about the Python-bugs-list mailing list