8000 bpo-44800: rename _PyInterpreterFrame to _Py_frame by ncoghlan · Pull Request #31987 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-44800: rename _PyInterpreterFrame to _Py_frame #31987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix misleading use of 'cframe' name in typeobject.c
  • Loading branch information
ncoghlan committed Mar 19, 2022
commit a47e554e4532a7619b6b88fb53fafce153b224e3
10 changes: 5 additions & 5 deletions Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -8933,7 +8933,7 @@ super_descr_get(PyObject *self, PyObject *obj, PyObject *type)
}

static int
super_init_without_args(_Py_frame *cframe, PyCodeObject *co,
super_init_without_args(_Py_frame *frame, PyCodeObject *co,
PyTypeObject **type_p, PyObject **obj_p)
{
if (co->co_argcount == 0) {
Expand All @@ -8942,13 +8942,13 @@ super_init_without_args(_Py_frame *cframe, PyCodeObject *co,
return -1;
}

assert(cframe->code->co_nlocalsplus > 0);
PyObject *firstarg = _PyFrame_GetLocalsArray(cframe)[0];
assert(frame->code->co_nlocalsplus > 0);
PyObject *firstarg = _PyFrame_GetLocalsArray(frame)[0];
// The first argument might be a cell.
if (firstarg != NULL && (_PyLocals_GetKind(co->co_localspluskinds, 0) & CO_FAST_CELL)) {
// "firstarg" is a cell here unless (very unlikely) super()
// was called from the C-API before the first MAKE_CELL op.
if (cframe->lasti >= 0) {
if (frame->lasti >= 0) {
assert(_Py_OPCODE(*co->co_firstinstr) == MAKE_CELL || _Py_OPCODE(*co->co_firstinstr) == COPY_FREE_VARS);
assert(PyCell_Check(firstarg));
firstarg = PyCell_GET(firstarg);
Expand All @@ -8968,7 +8968,7 @@ super_init_without_args(_Py_frame *cframe, PyCodeObject *co,
PyObject *name = PyTuple_GET_ITEM(co->co_localsplusnames, i);
assert(PyUnicode_Check(name));
if (_PyUnicode_Equal(name, &_Py_ID(__class__))) {
PyObject *cell = _PyFrame_GetLocalsArray(cframe)[i];
PyObject *cell = _PyFrame_GetLocalsArray(frame)[i];
if (cell == NULL || !PyCell_Check(cell)) {
PyErr_SetString(PyExc_RuntimeError,
"super(): bad __class__ cell");
Expand Down
0