8000 Make `range_vectorcall` compatible with `vectorcallfunc` · python/cpython@531d69d · GitHub
[go: up one dir, main page]

Skip to content

Commit 531d69d

committed
Make range_vectorcall compatible with vectorcallfunc
1 parent e29710f commit 531d69d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Objects/rangeobject.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,14 @@ range_new(PyTypeObject *type, PyObject *args, PyObject *kw)
143143

144144

145145
static PyObject *
146-
range_vectorcall(PyTypeObject *type, PyObject *const *args,
146+
range_vectorcall(PyObject *rangetype, PyObject *const *args,
147147
size_t nargsf, PyObject *kwnames)
148148
{
149149
Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
150150
if (!_PyArg_NoKwnames("range", kwnames)) {
151151
return NULL;
152152
}
153-
return range_from_array(type, args, nargs);
153+
return range_from_array((PyTypeObject *)rangetype, args, nargs);
154154
}
155155

156156
PyDoc_STRVAR(range_doc,
@@ -803,7 +803,7 @@ PyTypeObject PyRange_Type = {
803803
0, /* tp_init */
804804
0, /* tp_alloc */
805805
range_new, /* tp_new */
806-
.tp_vectorcall = (vectorcallfunc)range_vectorcall
806+
.tp_vectorcall = range_vectorcall
807807
};
808808

809809
/*********************** range Iterator **************************/

0 commit comments

Comments
 (0)
0