diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2001-11-05 14:36:32 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2001-11-05 14:36:32 (GMT) |
commit | 80c85d80c4c0ae7ebbd3fb650c23346c391edb7b (patch) | |
tree | d855502f15cf5de69733c386ea33332e523c8b2a /Mac/Python | |
parent | 3b5074b0fba839326b914b0bfbcbc6d5e33e8f7c (diff) | |
download | cpython-80c85d80c4c0ae7ebbd3fb650c23346c391edb7b.zip cpython-80c85d80c4c0ae7ebbd3fb650c23346c391edb7b.tar.gz cpython-80c85d80c4c0ae7ebbd3fb650c23346c391edb7b.tar.bz2 |
MacPython -vv equivalent printed incorrect filenames, fixed. Also
removed some outdated code.
Diffstat (limited to 'Mac/Python')
-rw-r--r-- | Mac/Python/macimport.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/Mac/Python/macimport.c b/Mac/Python/macimport.c index 82d6438..b6c2d88 100644 --- a/Mac/Python/macimport.c +++ b/Mac/Python/macimport.c @@ -437,13 +437,7 @@ PyMac_FindModuleExtension(char *buf, size_t *lenp, char *module) if ( !_PyImport_Filetab[0].suffix ) return 0; -#if 0 - /* Pre 1.5a4 */ - strcpy(buf+*lenp, module); - strcpy(buf+*lenp+modnamelen, _PyImport_Filetab[0].suffix); -#else strcpy(buf+*lenp, _PyImport_Filetab[0].suffix); -#endif #ifdef USE_GUSI1 if ( Path2FSSpec(buf, &fss) == noErr && FSpGetFInfo(&fss, &finfo) == noErr) @@ -465,6 +459,7 @@ PyMac_FindModuleExtension(char *buf, size_t *lenp, char *module) */ if ( modnamelen > 54 ) return 0; /* Leave room for extension */ strcpy((char *)fnbuf+1, module); + buf[*lenp] = '\0'; for( fdp = _PyImport_Filetab+1; fdp->suffix; fdp++ ) { strcpy((char *)fnbuf+1+modnamelen, fdp->suffix); @@ -473,12 +468,7 @@ PyMac_FindModuleExtension(char *buf, size_t *lenp, char *module) PySys_WriteStderr("# trying %s%s\n", buf, fdp->suffix); if ( FSMakeFSSpec(refnum, dirid, fnbuf, &fss) == noErr ) { /* Found it. */ -#if 0 - strcpy(buf+*lenp+modnamelen, fdp->suffix); -#else strcpy(buf+*lenp, fdp->suffix); -#endif - *lenp = strlen(buf); return fdp; } } |