mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
GH-108035: Remove the _PyCFrame
struct as it is no longer needed for performance. (GH-108036)
This commit is contained in:
parent
33e6e3fec0
commit
006e44f950
21 changed files with 66 additions and 103 deletions
|
@ -1954,7 +1954,7 @@ sys__getframe_impl(PyObject *module, int depth)
|
|||
/*[clinic end generated code: output=d438776c04d59804 input=c1be8a6464b11ee5]*/
|
||||
{
|
||||
PyThreadState *tstate = _PyThreadState_GET();
|
||||
_PyInterpreterFrame *frame = tstate->cframe->current_frame;
|
||||
_PyInterpreterFrame *frame = tstate->current_frame;
|
||||
|
||||
if (frame != NULL) {
|
||||
while (depth > 0) {
|
||||
|
@ -2270,7 +2270,7 @@ sys__getframemodulename_impl(PyObject *module, int depth)
|
|||
if (PySys_Audit("sys._getframemodulename", "i", depth) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
_PyInterpreterFrame *f = _PyThreadState_GET()->cframe->current_frame;
|
||||
_PyInterpreterFrame *f = _PyThreadState_GET()->current_frame;
|
||||
while (f && (_PyFrame_IsIncomplete(f) || depth-- > 0)) {
|
||||
f = f->previous;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue