aboutsummaryrefslogtreecommitdiff
path: root/Python/dynload_win.c
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2020-02-04 20:13:00 -0700
committerGitHub <noreply@github.com>2020-02-04 19:13:00 -0800
commitb439a715cb75e2663df32588fd004c7528b9f83b (patch)
tree480b47d06b8fe4e870841bf74db3963da1ed8cd8 /Python/dynload_win.c
parentcf5b109dbb39bcff1bc5b5d22036866d11de971b (diff)
downloadcpython3-b439a715cb75e2663df32588fd004c7528b9f83b.tar.gz
bpo-39553: Delete HAVE_SXS protected code (GH-18356)
https://bugs.python.org/issue39553 Automerge-Triggered-By: @zooba
Diffstat (limited to 'Python/dynload_win.c')
-rw-r--r--Python/dynload_win.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/Python/dynload_win.c b/Python/dynload_win.c
index 6deba1134e..2bf3384b9e 100644
--- a/Python/dynload_win.c
+++ b/Python/dynload_win.c
@@ -12,12 +12,6 @@
#include "patchlevel.h"
#include <windows.h>
-// "activation context" magic - see dl_nt.c...
-#if HAVE_SXS
-extern ULONG_PTR _Py_ActivateActCtx();
-void _Py_DeactivateActCtx(ULONG_PTR cookie);
-#endif
-
#ifdef _DEBUG
#define PYD_DEBUG_SUFFIX "_d"
#else
@@ -187,16 +181,10 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
{
HINSTANCE hDLL = NULL;
unsigned int old_mode;
-#if HAVE_SXS
- ULONG_PTR cookie = 0;
-#endif
/* Don't display a message box when Python can't load a DLL */
old_mode = SetErrorMode(SEM_FAILCRITICALERRORS);
-#if HAVE_SXS
- cookie = _Py_ActivateActCtx();
-#endif
/* bpo-36085: We use LoadLibraryEx with restricted search paths
to avoid DLL preloading attacks and enable use of the
AddDllDirectory function. We add SEARCH_DLL_LOAD_DIR to
@@ -206,9 +194,6 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
LOAD_LIBRARY_SEARCH_DEFAULT_DIRS |
LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR);
Py_END_ALLOW_THREADS
-#if HAVE_SXS
- _Py_DeactivateActCtx(cookie);
-#endif
/* restore old error mode settings */
SetErrorMode(old_mode);