summaryrefslogtreecommitdiffstats
path: root/Python/dynload_win.c
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2022-05-12 05:48:38 (GMT)
committerGitHub <noreply@github.com>2022-05-12 05:48:38 (GMT)
commitf9c9354a7a173eaca2aa19e667b5cf12167b7fed (patch)
treeeb0fdd3219f53c973f1a7dbbcb9f8b0e0babdf36 /Python/dynload_win.c
parent68fec31364e96d122aae0571c14683b4ddb0ebd0 (diff)
downloadcpython-f9c9354a7a173eaca2aa19e667b5cf12167b7fed.zip
cpython-f9c9354a7a173eaca2aa19e667b5cf12167b7fed.tar.gz
cpython-f9c9354a7a173eaca2aa19e667b5cf12167b7fed.tar.bz2
gh-92536: PEP 623: Remove wstr and legacy APIs from Unicode (GH-92537)
Diffstat (limited to 'Python/dynload_win.c')
-rw-r--r--Python/dynload_win.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/Python/dynload_win.c b/Python/dynload_win.c
index b43e9fc..c03bc56 100644
--- a/Python/dynload_win.c
+++ b/Python/dynload_win.c
@@ -225,11 +225,7 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
_Py_CheckPython3();
-#if USE_UNICODE_WCHAR_CACHE
- const wchar_t *wpathname = _PyUnicode_AsUnicode(pathname);
-#else /* USE_UNICODE_WCHAR_CACHE */
wchar_t *wpathname = PyUnicode_AsWideCharString(pathname, NULL);
-#endif /* USE_UNICODE_WCHAR_CACHE */
if (wpathname == NULL)
return NULL;
@@ -251,9 +247,7 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
LOAD_LIBRARY_SEARCH_DEFAULT_DIRS |
LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR);
Py_END_ALLOW_THREADS
-#if !USE_UNICODE_WCHAR_CACHE
PyMem_Free(wpathname);
-#endif /* USE_UNICODE_WCHAR_CACHE */
/* restore old error mode settings */
SetErrorMode(old_mode);