Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c73f83c

Browse files
committed
Fixed for new "import dir.module" semantics. Needs accompanying fix in
import.c (yes Guido, I'll send it tomorrow)
1 parent 55e3927 commit c73f83c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Mac/Python/macglue.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,8 +862,13 @@ PyMac_FindModuleExtension(char *buf, int *lenp, char *module)
862862
if ( !_PyImport_Filetab[0].suffix )
863863
return 0;
864864

865+
#if 0
866+
/* Pre 1.5a4 */
865867
strcpy(buf+*lenp, module);
866868
strcpy(buf+*lenp+modnamelen, _PyImport_Filetab[0].suffix);
869+
#else
870+
strcpy(buf+*lenp, _PyImport_Filetab[0].suffix);
871+
#endif
867872
if ( FSMakeFSSpec(0, 0, Pstring(buf), &fss) == noErr )
868873
return _PyImport_Filetab;
869874
/*
@@ -887,7 +892,11 @@ PyMac_FindModuleExtension(char *buf, int *lenp, char *module)
887892
fprintf(stderr, "# trying %s%s\n", buf, fdp->suffix);
888893
if ( FSMakeFSSpec(refnum, dirid, fnbuf, &fss) == noErr ) {
889894
/* Found it. */
895+
#if 0
890896
strcpy(buf+*lenp+modnamelen, fdp->suffix);
897+
#else
898+
strcpy(buf+*lenp+modnamelen, fdp->suffix);
899+
#endif
891900
*lenp = strlen(buf);
892901
return fdp;
893902
}

0 commit comments

Comments
 (0)