mirror of
https://github.com/python/cpython
synced 2024-09-05 16:38:56 +00:00
bpo-45720: Drop references to shlwapi.dll on Windows (GH-29417)
This commit is contained in:
parent
4d8f2e09b6
commit
a4774f42e3
|
@ -0,0 +1,3 @@
|
|||
Internal reference to :file:`shlwapi.dll` was dropped to help improve
|
||||
startup time. This DLL will no longer be loaded at the start of every Python
|
||||
process.
|
|
@ -92,7 +92,6 @@
|
|||
|
||||
#include <windows.h>
|
||||
#include <pathcch.h>
|
||||
#include <shlwapi.h>
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
|
@ -265,7 +264,8 @@ canonicalize(wchar_t *buffer, const wchar_t *path)
|
|||
return _PyStatus_NO_MEMORY();
|
||||
}
|
||||
|
||||
if (PathIsRelativeW(path)) {
|
||||
const wchar_t *pathTail;
|
||||
if (FAILED(PathCchSkipRoot(path, &pathTail)) || path == pathTail) {
|
||||
wchar_t buff[MAXPATHLEN + 1];
|
||||
if (!GetCurrentDirectoryW(MAXPATHLEN, buff)) {
|
||||
return _PyStatus_ERR("unable to find current working directory");
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<AdditionalDependencies>version.lib;shlwapi.lib;ws2_32.lib;pathcch.lib;bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>version.lib;ws2_32.lib;pathcch.lib;bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
<PreprocessorDefinitions Condition="$(IncludeExternals)">_Py_HAVE_ZLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>version.lib;shlwapi.lib;ws2_32.lib;pathcch.lib;bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>version.lib;ws2_32.lib;pathcch.lib;bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
|
Loading…
Reference in a new issue