summaryrefslogtreecommitdiffstats
path: root/Modules/mpzmodule.c
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2000-09-01 09:01:32 (GMT)
committerBarry Warsaw <barry@python.org>2000-09-01 09:01:32 (GMT)
commit9bfd2bf5ede8e5d58775180d6867d81ddcdd3594 (patch)
treecd3adf2b98bc2c0b94980df1953ae9709f46cc28 /Modules/mpzmodule.c
parent72dacb80262b73a833802c0b0e5941b8cdb1d79c (diff)
downloadcpython-9bfd2bf5ede8e5d58775180d6867d81ddcdd3594.zip
cpython-9bfd2bf5ede8e5d58775180d6867d81ddcdd3594.tar.gz
cpython-9bfd2bf5ede8e5d58775180d6867d81ddcdd3594.tar.bz2
Do the absolute minimal amount of modifications to eradicate
Py_FatalError() from module initialization functions. The importing mechanism already checks for PyErr_Occurred() after module importation and it Does The Right Thing. Unfortunately, the following either were not compiled or tested by the regression suite, due to issues with my development platform: almodule.c cdmodule.c mpzmodule.c puremodule.c timingmodule.c
Diffstat (limited to 'Modules/mpzmodule.c')
-rw-r--r--Modules/mpzmodule.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/Modules/mpzmodule.c b/Modules/mpzmodule.c
index ad52736..8be9f08 100644
--- a/Modules/mpzmodule.c
+++ b/Modules/mpzmodule.c
@@ -1729,23 +1729,25 @@ initmpz(void)
/* create some frequently used constants */
if ((mpz_value_zero = newmpzobject()) == NULL)
- Py_FatalError("initmpz: can't initialize mpz constants");
+ goto finally;
mpz_set_ui(&mpz_value_zero->mpz, (unsigned long int)0);
if ((mpz_value_one = newmpzobject()) == NULL)
- Py_FatalError("initmpz: can't initialize mpz constants");
+ goto finally;
mpz_set_ui(&mpz_value_one->mpz, (unsigned long int)1);
if ((mpz_value_mone = newmpzobject()) == NULL)
- Py_FatalError("initmpz: can't initialize mpz constants");
+ goto finally;
mpz_set_si(&mpz_value_mone->mpz, (long)-1);
dict = PyModule_GetDict(module);
if (dict != NULL) {
PyDict_SetItemString(dict, "MPZType", (PyObject*)&MPZtype);
}
-
+ finally:
+ return;
} /* initmpz() */
+
#ifdef MAKEDUMMYINT
int _mpz_dummy_int; /* XXX otherwise, we're .bss-less (DYNLOAD->Jack?) */
#endif /* def MAKEDUMMYINT */