mirror of https://github.com/python/cpython.git
gh-101614: Don't treat python3_d.dll as a Python DLL when checking extension modules for incompatibility (GH-101615)
(cherry picked from commit 3a88de7a0a
)
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
This commit is contained in:
parent
c51cd54b65
commit
c63d7c95ba
|
@ -0,0 +1 @@
|
||||||
|
Correctly handle extensions built against debug binaries that reference ``python3_d.dll``.
|
|
@ -123,14 +123,15 @@ static char *GetPythonImport (HINSTANCE hModule)
|
||||||
!strncmp(import_name,"python",6)) {
|
!strncmp(import_name,"python",6)) {
|
||||||
char *pch;
|
char *pch;
|
||||||
|
|
||||||
#ifndef _DEBUG
|
/* Don't claim that python3.dll is a Python DLL. */
|
||||||
/* In a release version, don't claim that python3.dll is
|
#ifdef _DEBUG
|
||||||
a Python DLL. */
|
if (strcmp(import_name, "python3_d.dll") == 0) {
|
||||||
|
#else
|
||||||
if (strcmp(import_name, "python3.dll") == 0) {
|
if (strcmp(import_name, "python3.dll") == 0) {
|
||||||
|
#endif
|
||||||
import_data += 20;
|
import_data += 20;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Ensure python prefix is followed only
|
/* Ensure python prefix is followed only
|
||||||
by numbers to the end of the basename */
|
by numbers to the end of the basename */
|
||||||
|
|
Loading…
Reference in New Issue