]> granicus.if.org Git - python/commitdiff
No need to issue a fatal error if the PyDict_SetItemString fails; the
authorGuido van Rossum <guido@python.org>
Wed, 14 Oct 1998 13:45:06 +0000 (13:45 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 14 Oct 1998 13:45:06 +0000 (13:45 +0000)
caller (in import.c) will test for errors and take appropriate action.

Modules/arraymodule.c

index 99481ec8abea2070629d2cecee33c17a562c3e72..fc31b31e8c9c684504c4d652843c2677338c92c9 100644 (file)
@@ -1463,7 +1463,6 @@ initarray()
        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 */
 }