STINNER Victor <vstin...@python.org> added the comment:
Steve: > Why are we keeping the DLL path around at all? It should only be being used > in 1-2 places during path calculation. _PyPathConfig_Init() initializes _Py_dll_path global variable which is only used by _Py_CheckPython3(). _Py_CheckPython3() is called at each _PyImport_FindSharedFuncptrWindows() call which is used by _PyImport_LoadDynamicModuleWithSpec() (to import a .pyd extension). I tried to minimize my changes to fix the issue, I tried to leave _Py_CheckPython3() unchanged. But I made one change in _Py_CheckPython3(): it handles the case _Py_dll_path=NULL... which should never occur, but I wasn't 100% sure that it really can never occur. Python 3.6 (before my init work), _Py_CheckPython3() used "static wchar_t dllpath[MAXPATHLEN+1];": it was less important when dllpath is initialized. -- _PyPathConfig_Calculate() of PC/getpathp.c now uses a temporary variable which stores the result of _Py_GetDLLPath(). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38234> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com