Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.10] gh-101614: Don't treat python3_d.dll as a Python DLL when checking extension modules for incompatibility (GH-101615) #101691

Merged
merged 1 commit into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Correctly handle extensions built against debug binaries that reference ``python3_d.dll``.
9 changes: 5 additions & 4 deletions Python/dynload_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,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 */
Expand Down