Fixed for new "import dir.module" semantics. Needs accompanying fix in
import.c (yes Guido, I'll send it tomorrow)
This commit is contained in:
parent
55e3927f58
commit
c73f83c8d9
|
@ -862,8 +862,13 @@ PyMac_FindModuleExtension(char *buf, int *lenp, char *module)
|
||||||
if ( !_PyImport_Filetab[0].suffix )
|
if ( !_PyImport_Filetab[0].suffix )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/* Pre 1.5a4 */
|
||||||
strcpy(buf+*lenp, module);
|
strcpy(buf+*lenp, module);
|
||||||
strcpy(buf+*lenp+modnamelen, _PyImport_Filetab[0].suffix);
|
strcpy(buf+*lenp+modnamelen, _PyImport_Filetab[0].suffix);
|
||||||
|
#else
|
||||||
|
strcpy(buf+*lenp, _PyImport_Filetab[0].suffix);
|
||||||
|
#endif
|
||||||
if ( FSMakeFSSpec(0, 0, Pstring(buf), &fss) == noErr )
|
if ( FSMakeFSSpec(0, 0, Pstring(buf), &fss) == noErr )
|
||||||
return _PyImport_Filetab;
|
return _PyImport_Filetab;
|
||||||
/*
|
/*
|
||||||
|
@ -887,7 +892,11 @@ PyMac_FindModuleExtension(char *buf, int *lenp, char *module)
|
||||||
fprintf(stderr, "# trying %s%s\n", buf, fdp->suffix);
|
fprintf(stderr, "# trying %s%s\n", buf, fdp->suffix);
|
||||||
if ( FSMakeFSSpec(refnum, dirid, fnbuf, &fss) == noErr ) {
|
if ( FSMakeFSSpec(refnum, dirid, fnbuf, &fss) == noErr ) {
|
||||||
/* Found it. */
|
/* Found it. */
|
||||||
|
#if 0
|
||||||
strcpy(buf+*lenp+modnamelen, fdp->suffix);
|
strcpy(buf+*lenp+modnamelen, fdp->suffix);
|
||||||
|
#else
|
||||||
|
strcpy(buf+*lenp+modnamelen, fdp->suffix);
|
||||||
|
#endif
|
||||||
*lenp = strlen(buf);
|
*lenp = strlen(buf);
|
||||||
return fdp;
|
return fdp;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue