aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/dynload_win.c
diff options
context:
space:
mode:
authorDavid Hewitt <1939362+davidhewitt@users.noreply.github.com>2023-02-08 14:23:57 +0000
committerGitHub <noreply@github.com>2023-02-08 14:23:57 +0000
commit3a88de7a0af00872d9d57e1d98bc2f035cb15a1c (patch)
tree6980d24f24656b6df38556e3ac9826e8e9cf47b4 /Python/dynload_win.c
parenteb49d32b9af0b3b01a5588626179187f11d145c9 (diff)
downloadcpython-3a88de7a0af00872d9d57e1d98bc2f035cb15a1c.tar.gz
cpython-3a88de7a0af00872d9d57e1d98bc2f035cb15a1c.zip
gh-101614: Don't treat python3_d.dll as a Python DLL when checking extension modules for incompatibility (GH-101615)
Diffstat (limited to 'Python/dynload_win.c')
-rw-r--r--Python/dynload_win.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Python/dynload_win.c b/Python/dynload_win.c
index c03bc5602bf..7bd04d573df 100644
--- a/Python/dynload_win.c
+++ b/Python/dynload_win.c
@@ -125,14 +125,15 @@ static char *GetPythonImport (HINSTANCE hModule)
!strncmp(import_name,"python",6)) {
char *pch;
-#ifndef _DEBUG
- /* In a release version, don't claim that python3.dll is
- a Python DLL. */
+ /* Don't claim that python3.dll is a Python DLL. */
+#ifdef _DEBUG
+ if (strcmp(import_name, "python3_d.dll") == 0) {
+#else
if (strcmp(import_name, "python3.dll") == 0) {
+#endif
import_data += 20;
continue;
}
-#endif
/* Ensure python prefix is followed only
by numbers to the end of the basename */