bpo-46417: Use _PyType_CAST() in Objects directory (GH-30764)

This commit is contained in:
Victor Stinner
2022-01-21 23:33:43 +01:00
committed by GitHub
parent 7835cbf949
commit ac1f152421
9 changed files with 13 additions and 20 deletions

View File

@@ -3450,13 +3450,12 @@ static PyObject *
dict_vectorcall(PyObject *type, PyObject * const*args,
size_t nargsf, PyObject *kwnames)
{
assert(PyType_Check(type));
Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
if (!_PyArg_CheckPositional("dict", nargs, 0, 1)) {
return NULL;
}
PyObject *self = dict_new((PyTypeObject *)type, NULL, NULL);
PyObject *self = dict_new(_PyType_CAST(type), NULL, NULL);
if (self == NULL) {
return NULL;
}