Skip to content

Commit d8e29ba

Browse files
committed
gh-101614: don't treat python3_d.dll as a Python dll
1 parent 7a25310 commit d8e29ba

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Python/dynload_win.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,15 @@ static char *GetPythonImport (HINSTANCE hModule)
125125
!strncmp(import_name,"python",6)) {
126126
char *pch;
127127

128-
#ifndef _DEBUG
129-
/* In a release version, don't claim that python3.dll is
130-
a Python DLL. */
128+
/* Don't claim that python3.dll is a Python DLL. */
129+
#ifdef _DEBUG
130+
if (strcmp(import_name, "python3_d.dll") == 0) {
131+
#else
131132
if (strcmp(import_name, "python3.dll") == 0) {
133+
#endif
132134
import_data += 20;
133135
continue;
134136
}
135-
#endif
136137

137138
/* Ensure python prefix is followed only
138139
by numbers to the end of the basename */

0 commit comments

Comments
 (0)