summaryrefslogtreecommitdiffstats
path: root/Python/dynload_win.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2010-12-03 20:14:31 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2010-12-03 20:14:31 (GMT)
commit4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9 (patch)
treec8f1fef715f8d158e58f17cab14af65455de1d77 /Python/dynload_win.c
parentc4df7845143f9afe0d20f4421a41904f3cbb991a (diff)
downloadcpython-4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9.zip
cpython-4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9.tar.gz
cpython-4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9.tar.bz2
Merge branches/pep-0384.
Diffstat (limited to 'Python/dynload_win.c')
-rw-r--r--Python/dynload_win.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/Python/dynload_win.c b/Python/dynload_win.c
index e7d61ce..73a1dcf 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);
{