summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2000-06-02 21:29:59 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2000-06-02 21:29:59 (GMT)
commit33d1ad28cba273b94c70ffc22deb6c53b0c1b068 (patch)
treeb2e6934c3c0c9be97a7d0587ea005caf2cf3aa41 /Mac
parentee6eeb1876d2764e505a30122f273b644bf63ec1 (diff)
downloadcpython-33d1ad28cba273b94c70ffc22deb6c53b0c1b068.zip
cpython-33d1ad28cba273b94c70ffc22deb6c53b0c1b068.tar.gz
cpython-33d1ad28cba273b94c70ffc22deb6c53b0c1b068.tar.bz2
Replaced GetFInfo and SetFInfo calls with FspGetFInfo and FspSetFInfo calls, which are carbon-compatible.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Python/macsetfiletype.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/Mac/Python/macsetfiletype.c b/Mac/Python/macsetfiletype.c
index cb2d822..c4b114f 100644
--- a/Mac/Python/macsetfiletype.c
+++ b/Mac/Python/macsetfiletype.c
@@ -42,14 +42,17 @@ char *name;
long creator, type;
{
FInfo info;
+ FSSpec fss;
unsigned char *pname;
pname = (StringPtr) Pstring(name);
- if ( GetFInfo(pname, 0, &info) < 0 )
+ if (FSMakeFSSpec(0, 0, pname, &fss) < 0 )
+ return -1;
+ if ( FSpGetFInfo(&fss, &info) < 0 )
return -1;
info.fdType = type;
info.fdCreator = creator;
- return SetFInfo(pname, 0, &info);
+ return FSpSetFInfo(&fss, &info);
}
long
@@ -58,9 +61,12 @@ char *name;
{
FInfo info;
unsigned char *pname;
+ FSSpec fss;
pname = (StringPtr) Pstring(name);
- if ( GetFInfo(pname, 0, &info) < 0 )
+ if (FSMakeFSSpec(0, 0, pname, &fss) < 0 )
+ return -1;
+ if ( FSpGetFInfo(&fss, &info) < 0 )
return -1;
return info.fdType;
}