diff Python/importdl.c @ 9096:2088f80253db legacy-trunk

Mac-specific mod to enable aliases on import paths. (Jack Jansen and/or Just van Rossum)
author Guido van Rossum <guido@python.org>
date Mon, 14 Sep 1998 13:40:53 +0000
parents 9962833d49fd
children 958e1faa38a9
line wrap: on
line diff
--- a/Python/importdl.c	Sun Sep 13 15:52:13 1998 +0000
+++ b/Python/importdl.c	Mon Sep 14 13:40:53 1998 +0000
@@ -249,6 +249,9 @@
 #define CFragConnectionID ConnectionID
 #define kLoadCFrag 0x01
 #endif
+#ifdef USE_GUSI
+#include "TFileSpec.h"		/* for Path2FSSpec() */
+#endif
 #include <Files.h>
 #include "macdefs.h"
 #include "macglue.h"
@@ -372,15 +375,21 @@
 		Ptr mainAddr;
 		Str255 errMessage;
 		OSErr err;
+#ifndef USE_GUSI
 		Boolean isfolder, didsomething;
+#endif
 		char buf[512];
 		Str63 fragname;
 		Ptr symAddr;
 		CFragSymbolClass class;
 		
 		/* First resolve any aliases to find the real file */
+#ifdef USE_GUSI
+		err = Path2FSSpec(pathname, &libspec);
+#else
 		(void)FSMakeFSSpec(0, 0, Pstring(pathname), &libspec);
 		err = ResolveAliasFile(&libspec, 1, &isfolder, &didsomething);
+#endif
 		if ( err ) {
 			sprintf(buf, "%.255s: %.200s",
 				pathname, PyMac_StrError(err));