Mercurial > cpython-lru_cache-weakref
diff Python/modsupport.c @ 13859:94f6ec87930a legacy-trunk
Add a test that Py_IsInitialized() in Py_InitModule4(). See
python-dev discussion.
This should catch future version incompatibilities on Windows. Alas,
this doesn't help for 1.5 vs. 1.6; but it will help for 1.6 vs. 2.0.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 04 Aug 2000 14:00:14 +0000 |
| parents | f79434ee41fa |
| children | 6f6f965c5e2d |
line wrap: on
line diff
--- a/Python/modsupport.c Fri Aug 04 13:34:43 2000 +0000 +++ b/Python/modsupport.c Fri Aug 04 14:00:14 2000 +0000 @@ -47,6 +47,8 @@ { PyObject *m, *d, *v; PyMethodDef *ml; + if (!Py_IsInitialized()) + Py_FatalError("Interpreter not initialized (version mismatch?)"); if (module_api_version != PYTHON_API_VERSION) fprintf(stderr, api_version_warning, name, PYTHON_API_VERSION, name, module_api_version);
