Mercurial > cpython-lru_cache-weakref
diff Mac/Python/macsetfiletype.c @ 12835:bc35647fe472 legacy-trunk
Replaced GetFInfo and SetFInfo calls with FspGetFInfo and FspSetFInfo calls, which are carbon-compatible.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Fri, 02 Jun 2000 21:29:59 +0000 |
| parents | d6b292a33cfe |
| children | db963a615bc9 |
line wrap: on
line diff
--- a/Mac/Python/macsetfiletype.c Fri Jun 02 21:28:52 2000 +0000 +++ b/Mac/Python/macsetfiletype.c Fri Jun 02 21:29:59 2000 +0000 @@ -42,14 +42,17 @@ 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 @@ { 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; }
