[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