summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-02-02 23:00:21 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-02-02 23:00:21 (GMT)
commit52377e05bedb604b1608f277480d7bb112ac0639 (patch)
treed2fc4fc388aa99fb235c93ceff46c64902d60021 /Mac
parent1d63c9f15134a2776b39fb979c506637f73c8a51 (diff)
downloadcpython-52377e05bedb604b1608f277480d7bb112ac0639.zip
cpython-52377e05bedb604b1608f277480d7bb112ac0639.tar.gz
cpython-52377e05bedb604b1608f277480d7bb112ac0639.tar.bz2
The FSAliasFile routines also have an in/out parameter.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Modules/file/_Filemodule.c10
-rw-r--r--Mac/Modules/file/filescan.py3
2 files changed, 9 insertions, 4 deletions
diff --git a/Mac/Modules/file/_Filemodule.c b/Mac/Modules/file/_Filemodule.c
index f762e7e..8939437 100644
--- a/Mac/Modules/file/_Filemodule.c
+++ b/Mac/Modules/file/_Filemodule.c
@@ -2954,7 +2954,8 @@ static PyObject *File_FSResolveAliasFileWithMountFlags(PyObject *_self, PyObject
Boolean targetIsFolder;
Boolean wasAliased;
unsigned long mountFlags;
- if (!PyArg_ParseTuple(_args, "bl",
+ if (!PyArg_ParseTuple(_args, "O&bl",
+ FSRef_Convert, &theRef,
&resolveAliasChains,
&mountFlags))
return NULL;
@@ -2979,7 +2980,8 @@ static PyObject *File_FSResolveAliasFile(PyObject *_self, PyObject *_args)
Boolean resolveAliasChains;
Boolean targetIsFolder;
Boolean wasAliased;
- if (!PyArg_ParseTuple(_args, "b",
+ if (!PyArg_ParseTuple(_args, "O&b",
+ FSRef_Convert, &theRef,
&resolveAliasChains))
return NULL;
_err = FSResolveAliasFile(&theRef,
@@ -3133,9 +3135,9 @@ static PyMethodDef File_methods[] = {
{"FSNewAlias", (PyCFunction)File_FSNewAlias, 1,
PyDoc_STR("(FSRef fromFile, FSRef target) -> (AliasHandle inAlias)")},
{"FSResolveAliasFileWithMountFlags", (PyCFunction)File_FSResolveAliasFileWithMountFlags, 1,
- PyDoc_STR("(Boolean resolveAliasChains, unsigned long mountFlags) -> (FSRef theRef, Boolean targetIsFolder, Boolean wasAliased)")},
+ PyDoc_STR("(FSRef theRef, Boolean resolveAliasChains, unsigned long mountFlags) -> (FSRef theRef, Boolean targetIsFolder, Boolean wasAliased)")},
{"FSResolveAliasFile", (PyCFunction)File_FSResolveAliasFile, 1,
- PyDoc_STR("(Boolean resolveAliasChains) -> (FSRef theRef, Boolean targetIsFolder, Boolean wasAliased)")},
+ PyDoc_STR("(FSRef theRef, Boolean resolveAliasChains) -> (FSRef theRef, Boolean targetIsFolder, Boolean wasAliased)")},
{"FSUpdateAlias", (PyCFunction)File_FSUpdateAlias, 1,
PyDoc_STR("(FSRef fromFile, FSRef target, AliasHandle alias) -> (Boolean wasChanged)")},
{"pathname", (PyCFunction)File_pathname, 1,
diff --git a/Mac/Modules/file/filescan.py b/Mac/Modules/file/filescan.py
index 8ac0e62..ca977af 100644
--- a/Mac/Modules/file/filescan.py
+++ b/Mac/Modules/file/filescan.py
@@ -172,6 +172,9 @@ class MyScanner(Scanner_OSX):
([('FSSpec', 'theSpec', 'OutMode')],
[('FSSpec_ptr', 'theSpec', 'InOutMode')]),
+ ([('FSRef', 'theRef', 'OutMode')],
+ [('FSRef_ptr', 'theRef', 'InOutMode')]),
+
# The optional FSSpec to all ResolveAlias and NewAlias methods
([('FSSpec_ptr', 'fromFile', 'InMode')],
[('OptFSSpecPtr', 'fromFile', 'InMode')]),