diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2001-08-03 13:31:36 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2001-08-03 13:31:36 (GMT) |
commit | cbed91b4db6817b7bbbb12ede40bfb5d26a9bf14 (patch) | |
tree | 1995f01bd8828ae9647ad407e40dd8584ca843da /Mac/Modules | |
parent | cb60dae6a1a7841138421866ea15870f6297cf8b (diff) | |
download | cpython-cbed91b4db6817b7bbbb12ede40bfb5d26a9bf14.zip cpython-cbed91b4db6817b7bbbb12ede40bfb5d26a9bf14.tar.gz cpython-cbed91b4db6817b7bbbb12ede40bfb5d26a9bf14.tar.bz2 |
Merging appropriate 2.1.1 fixes back into the main trunk.
Diffstat (limited to 'Mac/Modules')
-rw-r--r-- | Mac/Modules/ae/aescan.py | 1 | ||||
-rw-r--r-- | Mac/Modules/macfsmodule.c | 27 | ||||
-rw-r--r-- | Mac/Modules/res/resscan.py | 1 |
3 files changed, 26 insertions, 3 deletions
diff --git a/Mac/Modules/ae/aescan.py b/Mac/Modules/ae/aescan.py index 7007b4a..2852f13 100644 --- a/Mac/Modules/ae/aescan.py +++ b/Mac/Modules/ae/aescan.py @@ -5,7 +5,6 @@ import sys import os import string -import regsub import MacOS BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') diff --git a/Mac/Modules/macfsmodule.c b/Mac/Modules/macfsmodule.c index 5e34a64..e6f11ae 100644 --- a/Mac/Modules/macfsmodule.c +++ b/Mac/Modules/macfsmodule.c @@ -367,6 +367,7 @@ _mfs_GetFSSpecFromFSSpec(PyObject *self, FSSpec *fssp) static int _mfs_GetFSSpecFromFSRef(PyObject *self, FSSpec *fssp) { +#if !TARGET_API_MAC_OS8 static FSRef *fsrp; if ( is_mfsrobject(self) ) { @@ -374,6 +375,7 @@ _mfs_GetFSSpecFromFSRef(PyObject *self, FSSpec *fssp) if ( FSGetCatalogInfo(&((mfsrobject *)self)->fsref, kFSCatInfoNone, NULL, NULL, fssp, NULL) == noErr ) return 1; } +#endif return 0; } @@ -381,10 +383,12 @@ _mfs_GetFSSpecFromFSRef(PyObject *self, FSSpec *fssp) static int _mfs_GetFSRefFromFSRef(PyObject *self, FSRef *fsrp) { +#if !TARGET_API_MAC_OS8 if ( is_mfsrobject(self) ) { *fsrp = ((mfsrobject *)self)->fsref; return 1; } +#endif return 0; } @@ -392,10 +396,12 @@ _mfs_GetFSRefFromFSRef(PyObject *self, FSRef *fsrp) static int _mfs_GetFSRefFromFSSpec(PyObject *self, FSRef *fsrp) { +#if !TARGET_API_MAC_OS8 if ( is_mfssobject(self) ) { if ( FSpMakeFSRef(&((mfssobject *)self)->fsspec, fsrp) == noErr ) return 1; } +#endif return 0; } @@ -524,6 +530,10 @@ mfss_FSpMakeFSRef(self, args) mfssobject *self; PyObject *args; { +#if TARGET_API_MAC_OS8 + PyErr_SetString(PyExc_NotImplementedError, "FSRef objects not supported on this platform"); + return 0; +#else OSErr err; FSRef fsref; @@ -535,6 +545,7 @@ mfss_FSpMakeFSRef(self, args) return NULL; } return (PyObject *)newmfsrobject(&fsref); +#endif } /* XXXX These routines should be replaced by a wrapper to the *FInfo routines */ @@ -766,7 +777,7 @@ statichere PyTypeObject Mfsstype = { /* End of code for FSSpec objects */ /* -------------------------------------------------------- */ - +#if !TARGET_API_MAC_OS8 static PyObject * mfsr_as_fsspec(self, args) mfsrobject *self; @@ -871,6 +882,7 @@ statichere PyTypeObject Mfsrtype = { }; /* End of code for FSRef objects */ +#endif /* !TARGET_API_MAC_OS8 */ /* -------------------------------------------------------- */ static PyObject * @@ -1002,11 +1014,16 @@ mfs_FSRef(self, args) PyObject *self; /* Not used */ PyObject *args; { +#if TARGET_API_MAC_OS8 + PyErr_SetString(PyExc_NotImplementedError, "FSRef objects not supported on this platform"); + return 0; +#else FSRef fsr; if (!PyArg_ParseTuple(args, "O&", PyMac_GetFSRef, &fsr)) return NULL; return (PyObject *)newmfsrobject(&fsr); +#endif } static PyObject * @@ -1172,6 +1189,9 @@ static struct PyMethodDef mfs_methods[] = { int PyMac_GetFSRef(PyObject *v, FSRef *fsr) { +#if TARGET_API_MAC_OS8 + return 0; +#else OSErr err; /* If it's an FSRef we're also okay. */ @@ -1186,12 +1206,17 @@ PyMac_GetFSRef(PyObject *v, FSRef *fsr) } PyErr_SetString(PyExc_TypeError, "FSRef argument should be existing FSRef, FSSpec or (OSX only) pathname"); return 0; +#endif } /* Convert FSSpec to PyObject */ PyObject *PyMac_BuildFSRef(FSRef *v) { +#if TARGET_API_MAC_OS8 + return NULL; +#else return (PyObject *)newmfsrobject(v); +#endif } /* diff --git a/Mac/Modules/res/resscan.py b/Mac/Modules/res/resscan.py index 5b68623..d748adb 100644 --- a/Mac/Modules/res/resscan.py +++ b/Mac/Modules/res/resscan.py @@ -5,7 +5,6 @@ import sys import os import string -import regsub import MacOS BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') |