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/006851.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 PythonMark Hammond mhammond@skippinet.com.au
Mon, 17 Jul 2000 22:16:51 -0400
[Fredrik]
> 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 */

Py_InitModule4() is inside Pythonxx.dll - so it _will_ be initialized.  The
point of putting this code inside the .pyd is that the .pyd will be calling
the Py_IsInitialized() from Python15.dll - and this DLL has never been
initialized.  Putting it inside Py_InitModule4() will never trigger an
error...

Mark.




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