Author vstinner
Recipients lukasz.langa, pablogsal, steve.dower, vstinner
Date 2019-09-23.15:16:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1569251804.35.0.970102555779.issue38234@roundup.psfhosted.org>
In-reply-to
Content
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().
History
Date User Action Args
2019-09-23 15:16:44vstinnersetrecipients: + vstinner, lukasz.langa, steve.dower, pablogsal
2019-09-23 15:16:44vstinnersetmessageid: <1569251804.35.0.970102555779.issue38234@roundup.psfhosted.org>
2019-09-23 15:16:44vstinnerlinkissue38234 messages
2019-09-23 15:16:44vstinnercreate