Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3a88de7

Browse filesBrowse files
authored
gh-101614: Don't treat python3_d.dll as a Python DLL when checking extension modules for incompatibility (GH-101615)
1 parent eb49d32 commit 3a88de7
Copy full SHA for 3a88de7

File tree

Expand file treeCollapse file tree

2 files changed

+6
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-4
lines changed
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Correctly handle extensions built against debug binaries that reference ``python3_d.dll``.

‎Python/dynload_win.c

Copy file name to clipboardExpand all lines: Python/dynload_win.c
+5-4Lines changed: 5 additions & 4 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.