[Patches] [ python-Patches-410154 ] Patch for import case-check on macintosh
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 20 Mar 2001 13:15:32 -0800
Patches item #410154, was updated on 2001-03-20 13:15
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=410154&group_id=5470
Category: core (C code)
Group: None
Status: Open
Priority: 8
Submitted By: Jack Jansen (jackjansen)
Assigned to: Nobody/Anonymous (nobody)
Summary: Patch for import case-check on macintosh
Initial Comment:
This patch gets filesystem case-checking working again for the Macintosh.
I'm submitting it here in stead of checking it in myself because I don't currently have
any way to check that this patch doesn't break anything on Unix or Windows.
RCS file: /cvsroot/python/python/dist/src/Python/import.c,v
retrieving revision 2.173
diff -c -r2.173 import.c
*** import.c 2001/03/06 06:31:15 2.173
--- import.c 2001/03/20 20:59:30
***************
*** 979,991 ****
#endif
#ifdef macintosh
fdp = PyMac_FindModuleExtension(buf, &len, name);
! if (fdp)
! fp = fopen(buf, fdp->mode);
#else
for (fdp = _PyImport_Filetab; fdp->suffix != NULL; fdp++) {
strcpy(buf+len, fdp->suffix);
if (Py_VerboseFlag > 1)
PySys_WriteStderr("# trying %s\n", buf);
fp = fopen(buf, fdp->mode);
if (fp != NULL) {
if (case_ok(buf, len, namelen, name))
--- 979,991 ----
#endif
#ifdef macintosh
fdp = PyMac_FindModuleExtension(buf, &len, name);
! if (fdp) {
#else
for (fdp = _PyImport_Filetab; fdp->suffix != NULL; fdp++) {
strcpy(buf+len, fdp->suffix);
if (Py_VerboseFlag > 1)
PySys_WriteStderr("# trying %s\n", buf);
+ #endif /* !macintosh */
fp = fopen(buf, fdp->mode);
if (fp != NULL) {
if (case_ok(buf, len, namelen, name))
***************
*** 996,1002 ****
}
}
}
- #endif /* !macintosh */
if (fp != NULL)
break;
}
--- 996,1001 ----
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=410154&group_id=5470