From: Jack Jansen <jack.jansen@cwi.nl> Date: Fri, 2 Jun 2000 21:29:59 +0000 (+0000) Subject: Replaced GetFInfo and SetFInfo calls with FspGetFInfo and FspSetFInfo calls, which... X-Git-Tag: v2.0b1~1596 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33d1ad28cba273b94c70ffc22deb6c53b0c1b068;p=python Replaced GetFInfo and SetFInfo calls with FspGetFInfo and FspSetFInfo calls, which are carbon-compatible. --- diff --git a/Mac/Python/macsetfiletype.c b/Mac/Python/macsetfiletype.c index cb2d822665..c4b114fff7 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; }