mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-111178: fix some USAN failures - mismatched function pointers (GH-123004)
This commit is contained in:
parent
0e21cc6cf8
commit
702c4a2473
3 changed files with 9 additions and 7 deletions
|
|
@ -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,
|
||||
|
|
@ -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 **************************/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue