mirror of
https://github.com/python/cpython.git
synced 2025-10-06 23:21:06 +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
|
@ -1775,8 +1775,7 @@ OSError_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
PyObject *newtype;
|
||||
newtype = PyDict_GetItemWithError(state->errnomap, myerrno);
|
||||
if (newtype) {
|
||||
assert(PyType_Check(newtype));
|
||||
type = (PyTypeObject *) newtype;
|
||||
type = _PyType_CAST(newtype);
|
||||
}
|
||||
else if (PyErr_Occurred())
|
||||
goto error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue