Message353031
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(). |
|
| Date |
User |
Action |
Args |
| 2019-09-23 15:16:44 | vstinner | set | recipients:
+ vstinner, lukasz.langa, steve.dower, pablogsal |
| 2019-09-23 15:16:44 | vstinner | set | messageid: <[email protected]> |
| 2019-09-23 15:16:44 | vstinner | link | issue38234 messages |
| 2019-09-23 15:16:44 | vstinner | create | |
|