mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
bpo-35459: Use PyDict_GetItemWithError() instead of PyDict_GetItem(). (GH-11112)
This commit is contained in:
parent
a180b007d9
commit
a24107b04c
31 changed files with 538 additions and 242 deletions
|
|
@ -975,7 +975,7 @@ OSError_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
if (myerrno && PyLong_Check(myerrno) &&
|
||||
errnomap && (PyObject *) type == PyExc_OSError) {
|
||||
PyObject *newtype;
|
||||
newtype = PyDict_GetItem(errnomap, myerrno);
|
||||
newtype = PyDict_GetItemWithError(errnomap, myerrno);
|
||||
if (newtype) {
|
||||
assert(PyType_Check(newtype));
|
||||
type = (PyTypeObject *) newtype;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue