diff Modules/arraymodule.c @ 9362:50e0631cf117 legacy-trunk

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.
author Guido van Rossum <guido@python.org>
date Wed, 14 Oct 1998 13:45:06 +0000
parents 4c23ae6c6e82
children 38023a425e48
line wrap: on
line diff
--- a/Modules/arraymodule.c	Wed Oct 14 03:43:05 1998 +0000
+++ b/Modules/arraymodule.c	Wed Oct 14 13:45:06 1998 +0000
@@ -1463,7 +1463,6 @@
 	PyObject *m, *d;
 	m = Py_InitModule3("array", a_methods, module_doc);
 	d = PyModule_GetDict(m);
-	if (PyDict_SetItemString(d, "ArrayType",
-				 (PyObject *)&Arraytype) != 0)
-		Py_FatalError("can't define array.ArrayType");
+	PyDict_SetItemString(d, "ArrayType", (PyObject *)&Arraytype);
+	/* No need to check the error here, the caller will do that */
 }