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
Make range_vectorcall compatible with vectorcallfunc
  • Loading branch information
picnixz committed Aug 14, 2024
commit 531d69d0619d891014baf201c5fa75bb9b98721e
6 changes: 3 additions & 3 deletions Objects/rangeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ range_new(PyTypeObject *type, PyObject *args, PyObject *kw)


static PyObject *
range_vectorcall(PyTypeObject *type, PyObject *const *args,
range_vectorcall(PyObject *rangetype, PyObject *const *args,
size_t nargsf, PyObject *kwnames)
{
Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
if (!_PyArg_NoKwnames("range", kwnames)) {
return NULL;
}
return range_from_array(type, args, nargs);
return range_from_array((PyTypeObject *)rangetype, args, nargs);
}

PyDoc_STRVAR(range_doc,
Expand Down Expand Up @@ -803,7 +803,7 @@ PyTypeObject PyRange_Type = {
0, /* tp_init */
0, /* tp_alloc */
range_new, /* tp_new */
.tp_vectorcall = (vectorcallfunc)range_vectorcall
.tp_vectorcall = range_vectorcall
};

/*********************** range Iterator **************************/
Expand Down