A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-July/006775.html below:

[Python-Dev] Preventing 1.5 extensions crashing under 1.6/2.0 Python

[Python-Dev] Preventing 1.5 extensions crashing under 1.6/2.0 Python [Python-Dev] Preventing 1.5 extensions crashing under 1.6/2.0 PythonFredrik Lundh Fredrik Lundh" <effbot@telia.com
Mon, 17 Jul 2000 10:09:53 +0200
mark wrote:
> If we are asking them to change their code, can we investigate whether
> asking them to insert a simple:
>=20
> if (!Py_IsInitialized())
>   Py_FatalError("Bad Python version"); /* Never returns */
>=20
> works OK?  I believe it will, as long as Python's fatal error handler
> doesnt make thread-state assumptions.

I'm probably missing something here, but is there any reason
you cannot add this code to Py_InitModule4 instead:

   PyObject *m, *d, *v;
   PyMethodDef *ml;
+ if (!Py_IsInitialized())
+    Py_FatalError("Bad Python version"); /* Never returns */
   if (module_api_version !=3D PYTHON_API_VERSION)
    fprintf(stderr, api_version_warning,

</F>




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4