mirror of
https://github.com/python/cpython.git
synced 2025-07-15 15:25:29 +00:00
bpo-38234: Cleanup getpath.c (GH-16367)
* search_for_prefix() directly calls reduce() if found is greater than 0. * Add calculate_pybuilddir() subfunction. * search_for_prefix(): add path string buffer for readability. * Fix some error handling code paths: release resources on error. * calculate_read_pyenv(): rename tmpbuffer to filename. * test.pythoninfo now also logs windows.dll_path
This commit is contained in:
parent
52ad33abbf
commit
221fd84703
3 changed files with 138 additions and 88 deletions
|
@ -673,6 +673,13 @@ def collect_windows(info_add):
|
|||
res = bool(RtlAreLongPathsEnabled())
|
||||
info_add('windows.RtlAreLongPathsEnabled', res)
|
||||
|
||||
try:
|
||||
import _winapi
|
||||
dll_path = _winapi.GetModuleFileName(sys.dllhandle)
|
||||
info_add('windows.dll_path', dll_path)
|
||||
except (ImportError, AttributeError):
|
||||
pass
|
||||
|
||||
|
||||
def collect_info(info):
|
||||
error = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue