diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-02-08 14:48:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-08 14:48:42 (GMT) |
commit | c63d7c95bafd0beabc36ea1461966f1ef8fe9c7f (patch) | |
tree | 254c41b0e3509efdb5aea827bb95c455d6c2b71e /Python | |
parent | c51cd54b6560879c35ec6d36f8ec72194c4f27a9 (diff) | |
download | cpython-c63d7c95bafd0beabc36ea1461966f1ef8fe9c7f.zip cpython-c63d7c95bafd0beabc36ea1461966f1ef8fe9c7f.tar.gz cpython-c63d7c95bafd0beabc36ea1461966f1ef8fe9c7f.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')
-rw-r--r-- | Python/dynload_win.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Python/dynload_win.c b/Python/dynload_win.c index 5702ab2..96faa4b 100644 --- a/Python/dynload_win.c +++ b/Python/dynload_win.c @@ -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 */ |