diff options
author | Jesus Cea <jcea@jcea.es> | 2011-04-20 17:42:50 +0200 |
---|---|---|
committer | Jesus Cea <jcea@jcea.es> | 2011-04-20 17:42:50 +0200 |
commit | 67a2d7acf997a69c0592c1753be6a0986006c65f (patch) | |
tree | 9c073bd7a8c4de860391cb77b5506a66ccdd5843 /Python/dynload_win.c | |
parent | 2ee75d55cc5c1c419eae550c72c6b9497f47e48a (diff) | |
parent | 93b04cdb7787723c3a26019d0de8834e86150108 (diff) | |
download | cpython-67a2d7acf997a69c0592c1753be6a0986006c65f.tar.gz |
MERGE: startswith and endswith don't accept None as slice index. Patch by Torsten Becker. (closes #11828)
Diffstat (limited to 'Python/dynload_win.c')
-rw-r--r-- | Python/dynload_win.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Python/dynload_win.c b/Python/dynload_win.c index e7d61ce8e0..73a1dcf897 100644 --- a/Python/dynload_win.c +++ b/Python/dynload_win.c @@ -134,6 +134,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. */ + if (strcmp(import_name, "python3.dll") == 0) { + import_data += 20; + continue; + } +#endif + /* Ensure python prefix is followed only by numbers to the end of the basename */ pch = import_name + 6; @@ -162,13 +171,16 @@ static char *GetPythonImport (HINSTANCE hModule) return NULL; } - dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname, const char *pathname, FILE *fp) { dl_funcptr p; char funcname[258], *import_python; +#ifndef _DEBUG + _Py_CheckPython3(); +#endif + PyOS_snprintf(funcname, sizeof(funcname), "PyInit_%.200s", shortname); { |