Skip to content
Merged
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 more functions
  • Loading branch information
vstinner committed Mar 12, 2025
commit c27132d20cc240a21734e9a3f3aadee9739e8985
10 changes: 6 additions & 4 deletions Objects/odictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1891,8 +1891,9 @@ odictkeys_iter(_PyDictViewObject *dv)
}

static PyObject *
odictkeys_reversed(_PyDictViewObject *dv, PyObject *Py_UNUSED(ignored))
odictkeys_reversed(PyObject *op, PyObject *Py_UNUSED(ignored))
{
_PyDictViewObject *dv = (_PyDictViewObject*)op;
if (dv->dv_dict == NULL) {
Py_RETURN_NONE;
}
Expand All @@ -1901,7 +1902,7 @@ odictkeys_reversed(_PyDictViewObject *dv, PyObject *Py_UNUSED(ignored))
}

static PyMethodDef odictkeys_methods[] = {
{"__reversed__", (PyCFunction)odictkeys_reversed, METH_NOARGS, NULL},
{"__reversed__", odictkeys_reversed, METH_NOARGS, NULL},
{NULL, NULL} /* sentinel */
};

Expand Down Expand Up @@ -1958,8 +1959,9 @@ odictitems_iter(_PyDictViewObject *dv)
}

static PyObject *
odictitems_reversed(_PyDictViewObject *dv, PyObject *Py_UNUSED(ignored))
odictitems_reversed(PyObject *op, PyObject *Py_UNUSED(ignored))
{
_PyDictViewObject *dv = (_PyDictViewObject*)op;
if (dv->dv_dict == NULL) {
Py_RETURN_NONE;
}
Expand All @@ -1968,7 +1970,7 @@ odictitems_reversed(_PyDictViewObject *dv, PyObject *Py_UNUSED(ignored))
}

static PyMethodDef odictitems_methods[] = {
{"__reversed__", (PyCFunction)odictitems_reversed, METH_NOARGS, NULL},
{"__reversed__", odictitems_reversed, METH_NOARGS, NULL},
{NULL, NULL} /* sentinel */
};

Expand Down
Loading