Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
48a9c363
Commit
48a9c363
authored
Sep 07, 1998
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mods by Just to allow aliases in sys.path entries
parent
98199839
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
Mac/Python/macimport.c
Mac/Python/macimport.c
+20
-0
No files found.
Mac/Python/macimport.c
View file @
48a9c363
...
...
@@ -48,6 +48,10 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#endif
#include <CodeFragments.h>
#ifdef USE_GUSI
#include "TFileSpec.h"
/* for Path2FSSpec() */
#endif
typedef
void
(
*
dl_funcptr
)();
#define FUNCNAME_PATTERN "init%.200s"
...
...
@@ -100,7 +104,11 @@ findnamedresource(
UseResFile
(
PyMac_AppRefNum
);
filerh
=
-
1
;
}
else
{
#ifdef USE_GUSI
if
(
Path2FSSpec
(
filename
,
&
fss
)
!=
noErr
||
#else
if
(
FSMakeFSSpec
(
0
,
0
,
Pstring
(
filename
),
&
fss
)
!=
noErr
||
#endif
FSpGetFInfo
(
&
fss
,
&
finfo
)
!=
noErr
)
{
#ifdef INTERN_STRINGS
if
(
obj
&&
max_not_a_file
<
MAXPATHCOMPONENTS
&&
obj
->
ob_sinterned
)
...
...
@@ -296,7 +304,12 @@ char *filename;
UseResFile
(
PyMac_AppRefNum
);
filerh
=
-
1
;
}
else
{
#ifdef USE_GUSI
if
(
(
err
=
Path2FSSpec
(
filename
,
&
fss
))
!=
noErr
||
FSpGetFInfo
(
&
fss
,
&
finfo
)
!=
noErr
)
#else
if
(
(
err
=
FSMakeFSSpec
(
0
,
0
,
Pstring
(
filename
),
&
fss
))
!=
noErr
)
#endif
goto
error
;
if
(
(
err
=
FSpGetFInfo
(
&
fss
,
&
finfo
))
!=
noErr
)
goto
error
;
...
...
@@ -401,6 +414,7 @@ PyMac_FindModuleExtension(char *buf, int *lenp, char *module)
unsigned
char
fnbuf
[
64
];
int
modnamelen
=
strlen
(
module
);
FSSpec
fss
;
FInfo
finfo
;
short
refnum
;
long
dirid
;
...
...
@@ -419,8 +433,14 @@ PyMac_FindModuleExtension(char *buf, int *lenp, char *module)
#else
strcpy
(
buf
+*
lenp
,
_PyImport_Filetab
[
0
].
suffix
);
#endif
#ifdef USE_GUSI
if
(
Path2FSSpec
(
buf
,
&
fss
)
==
noErr
&&
FSpGetFInfo
(
&
fss
,
&
finfo
)
==
noErr
)
return
_PyImport_Filetab
;
#else
if
(
FSMakeFSSpec
(
0
,
0
,
Pstring
(
buf
),
&
fss
)
==
noErr
)
return
_PyImport_Filetab
;
#endif
/*
** We cannot check for fnfErr (unfortunately), it can mean either that
** the file doesn't exist (fine, we try others) or the path leading to it.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment