summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/macfsmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-01-30 08:56:06 (GMT)
committerGuido van Rossum <guido@python.org>1995-01-30 08:56:06 (GMT)
commitb2f524ae440c235596f625a0e8c1c9f29dcde62c (patch)
tree9266404c73effc8fafe1179db030b8334464fd93 /Mac/Modules/macfsmodule.c
parentd56c10927237a51041f89c73cc64a9e5620c5aab (diff)
downloadcpython-b2f524ae440c235596f625a0e8c1c9f29dcde62c.zip
cpython-b2f524ae440c235596f625a0e8c1c9f29dcde62c.tar.gz
cpython-b2f524ae440c235596f625a0e8c1c9f29dcde62c.tar.bz2
fixed StandardGetFile argument handling
Diffstat (limited to 'Mac/Modules/macfsmodule.c')
-rw-r--r--Mac/Modules/macfsmodule.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/Mac/Modules/macfsmodule.c b/Mac/Modules/macfsmodule.c
index 2183685..09c7883 100644
--- a/Mac/Modules/macfsmodule.c
+++ b/Mac/Modules/macfsmodule.c
@@ -405,27 +405,20 @@ mfs_StandardGetFile(self, args)
object *self; /* Not used */
object *args;
{
- char *list[4];
- SFTypeList typelist;
+ SFTypeList list;
short numtypes;
StandardFileReply reply;
list[0] = list[1] = list[2] = list[3] = 0;
numtypes = 0;
-#if 0
- /* XXXX Why doesn't this work? */
- if (!newgetargs(args, "|O&|O&|O&|O&", PyMac_GetOSType, &list[0],
+ if (!newgetargs(args, "|O&O&O&O&", PyMac_GetOSType, &list[0],
PyMac_GetOSType, &list[1], PyMac_GetOSType, &list[2],
PyMac_GetOSType, &list[3]) )
return NULL;
-#else
- if (!newgetargs(args, "|O&", PyMac_GetOSType, &list[0]) )
- return NULL;
-#endif
- while ( list[numtypes] && numtypes < 4 ) {
+ while ( numtypes < 4 && list[numtypes] ) {
numtypes++;
}
- StandardGetFile((FileFilterUPP)0, numtypes, typelist, &reply);
+ StandardGetFile((FileFilterUPP)0, numtypes, list, &reply);
return mkvalue("(Oi)", newmfssobject(&reply.sfFile), reply.sfGood);
}