mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-46417: Use _PyType_CAST() in Objects directory (GH-30764)
This commit is contained in:
parent
7835cbf949
commit
ac1f152421
9 changed files with 13 additions and 20 deletions
|
@ -88,8 +88,7 @@ static PyObject *
|
|||
enumerate_vectorcall(PyObject *type, PyObject *const *args,
|
||||
size_t nargsf, PyObject *kwnames)
|
||||
{
|
||||
assert(PyType_Check(type));
|
||||
PyTypeObject *tp = (PyTypeObject *)type;
|
||||
PyTypeObject *tp = _PyType_CAST(type);
|
||||
Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
|
||||
Py_ssize_t nkwargs = 0;
|
||||
if (nargs == 0) {
|
||||
|
@ -373,8 +372,6 @@ static PyObject *
|
|||
reversed_vectorcall(PyObject *type, PyObject * const*args,
|
||||
size_t nargsf, PyObject *kwnames)
|
||||
{
|
||||
assert(PyType_Check(type));
|
||||
|
||||
if (!_PyArg_NoKwnames("reversed", kwnames)) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -384,7 +381,7 @@ reversed_vectorcall(PyObject *type, PyObject * const*args,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
return reversed_new_impl((PyTypeObject *)type, args[0]);
|
||||
return reversed_new_impl(_PyType_CAST(type), args[0]);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue