mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
No need to issue a fatal error if the PyDict_SetItemString fails; the
caller (in import.c) will test for errors and take appropriate action.
This commit is contained in:
parent
35e55da7dc
commit
a0deb64024
1 changed files with 2 additions and 3 deletions
|
@ -1463,7 +1463,6 @@ initarray()
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
m = Py_InitModule3("array", a_methods, module_doc);
|
m = Py_InitModule3("array", a_methods, module_doc);
|
||||||
d = PyModule_GetDict(m);
|
d = PyModule_GetDict(m);
|
||||||
if (PyDict_SetItemString(d, "ArrayType",
|
PyDict_SetItemString(d, "ArrayType", (PyObject *)&Arraytype);
|
||||||
(PyObject *)&Arraytype) != 0)
|
/* No need to check the error here, the caller will do that */
|
||||||
Py_FatalError("can't define array.ArrayType");
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue