diff options
| author | Jack Jansen <jack.jansen@cwi.nl> | 2002-12-13 23:16:00 (GMT) |
|---|---|---|
| committer | Jack Jansen <jack.jansen@cwi.nl> | 2002-12-13 23:16:00 (GMT) |
| commit | 6d802a0ce35ea2d0058191e198edab2d87360278 (patch) | |
| tree | 29583b6f552b609f64ef228b3b5873f952b27d52 /Mac/Modules/file/_Filemodule.c | |
| parent | b2ef47b84efd289d9607348920d6000aad8324ff (diff) | |
| download | cpython-6d802a0ce35ea2d0058191e198edab2d87360278.zip cpython-6d802a0ce35ea2d0058191e198edab2d87360278.tar.gz cpython-6d802a0ce35ea2d0058191e198edab2d87360278.tar.bz2 | |
Tweaks to make this module OS9-compatible.
Diffstat (limited to 'Mac/Modules/file/_Filemodule.c')
| -rw-r--r-- | Mac/Modules/file/_Filemodule.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/Mac/Modules/file/_Filemodule.c b/Mac/Modules/file/_Filemodule.c index 6f7ef51..0029d6c 100644 --- a/Mac/Modules/file/_Filemodule.c +++ b/Mac/Modules/file/_Filemodule.c @@ -1199,7 +1199,7 @@ static PyObject *File_FSPathMakeRef(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; - char* path; + UInt8 * path; FSRef ref; Boolean isDirectory; if (!PyArg_ParseTuple(_args, "s", @@ -1215,6 +1215,8 @@ static PyObject *File_FSPathMakeRef(PyObject *_self, PyObject *_args) return _res; } +#if TARGET_API_MAC_OSX + static PyObject *File_FNNotify(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -1235,12 +1237,15 @@ static PyObject *File_FNNotify(PyObject *_self, PyObject *_args) _res = Py_None; return _res; } +#endif + +#if TARGET_API_MAC_OSX static PyObject *File_FNNotifyByPath(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; - char* path; + UInt8 * path; FNMessage message; OptionBits flags; if (!PyArg_ParseTuple(_args, "sll", @@ -1256,6 +1261,9 @@ static PyObject *File_FNNotifyByPath(PyObject *_self, PyObject *_args) _res = Py_None; return _res; } +#endif + +#if TARGET_API_MAC_OSX static PyObject *File_FNNotifyAll(PyObject *_self, PyObject *_args) { @@ -1274,6 +1282,7 @@ static PyObject *File_FNNotifyAll(PyObject *_self, PyObject *_args) _res = Py_None; return _res; } +#endif static PyObject *File_FSRefMakePath(PyObject *_self, PyObject *_args) { @@ -1411,13 +1420,22 @@ static PyMethodDef File_methods[] = { {"FSGetResourceForkName", (PyCFunction)File_FSGetResourceForkName, 1, PyDoc_STR("() -> (HFSUniStr255 resourceForkName)")}, {"FSPathMakeRef", (PyCFunction)File_FSPathMakeRef, 1, - PyDoc_STR("(char* path) -> (FSRef ref, Boolean isDirectory)")}, + PyDoc_STR("(UInt8 * path) -> (FSRef ref, Boolean isDirectory)")}, + +#if TARGET_API_MAC_OSX {"FNNotify", (PyCFunction)File_FNNotify, 1, PyDoc_STR("(FSRef ref, FNMessage message, OptionBits flags) -> None")}, +#endif + +#if TARGET_API_MAC_OSX {"FNNotifyByPath", (PyCFunction)File_FNNotifyByPath, 1, - PyDoc_STR("(char* path, FNMessage message, OptionBits flags) -> None")}, + PyDoc_STR("(UInt8 * path, FNMessage message, OptionBits flags) -> None")}, +#endif + +#if TARGET_API_MAC_OSX {"FNNotifyAll", (PyCFunction)File_FNNotifyAll, 1, PyDoc_STR("(FNMessage message, OptionBits flags) -> None")}, +#endif {"FSRefMakePath", (PyCFunction)File_FSRefMakePath, 1, PyDoc_STR("(FSRef) -> string")}, {NULL, NULL, 0} |
