summaryrefslogtreecommitdiffstats
path: root/Python/dynload_win.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-02-08 14:50:43 (GMT)
committerGitHub <noreply@github.com>2023-02-08 14:50:43 (GMT)
commite8ce85de594e62c73db8d523408c9e1b720f0d0b (patch)
tree32657a149d585386700e0b4ce7687faf47c25cc8 /Python/dynload_win.c
parent5f0b81905084eb5da7131d06a6a4f15beeab460f (diff)
downloadcpython-e8ce85de594e62c73db8d523408c9e1b720f0d0b.zip
cpython-e8ce85de594e62c73db8d523408c9e1b720f0d0b.tar.gz
cpython-e8ce85de594e62c73db8d523408c9e1b720f0d0b.tar.bz2
gh-101614: Don't treat python3_d.dll as a Python DLL when checking extension modules for incompatibility (GH-101615)
(cherry picked from commit 3a88de7a0af00872d9d57e1d98bc2f035cb15a1c) Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
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 b43e9fc..5dc4095 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 */