diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2001-01-19 23:46:28 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2001-01-19 23:46:28 (GMT) |
commit | c33a423c536862c2a1c7632c5afa871a25c46b77 (patch) | |
tree | e38da3b103f165c6fecab622c6ddb1e42b172025 /Mac/Modules | |
parent | 726d873887c9c7bc9a8296780780b3b6975d1240 (diff) | |
download | cpython-c33a423c536862c2a1c7632c5afa871a25c46b77.zip cpython-c33a423c536862c2a1c7632c5afa871a25c46b77.tar.gz cpython-c33a423c536862c2a1c7632c5afa871a25c46b77.tar.bz2 |
Treat an empty kwdict argument the same as a missing one.
Diffstat (limited to 'Mac/Modules')
-rw-r--r-- | Mac/Modules/Nav.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/Mac/Modules/Nav.c b/Mac/Modules/Nav.c index d8ef6ef..934dc87 100644 --- a/Mac/Modules/Nav.c +++ b/Mac/Modules/Nav.c @@ -437,8 +437,8 @@ nav_NavGetFile(self, args, kw) NavTypeListHandle typeList = NULL; OSErr err; - if ( kw ) { - if (!PyArg_ParseTuple(args, "")) + if ( kw && PyObject_IsTrue(kw) ) { + if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected")) return NULL; dict = kw; } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict)) @@ -474,8 +474,8 @@ nav_NavPutFile(self, args, kw) OSType fileCreator; OSErr err; - if ( kw ) { - if (!PyArg_ParseTuple(args, "")) + if ( kw && PyObject_IsTrue(kw) ) { + if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected")) return NULL; dict = kw; } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict)) @@ -510,7 +510,7 @@ nav_NavAskSaveChanges(self, args, kw) NavEventUPP eventProc = NULL; OSErr err; - if ( kw ) { + if ( kw && PyObject_IsTrue(kw) ) { if (!PyArg_ParseTuple(args, "l", &action)) return NULL; dict = kw; @@ -542,8 +542,8 @@ nav_NavCustomAskSaveChanges(self, args, kw) NavEventUPP eventProc = NULL; OSErr err; - if ( kw ) { - if (!PyArg_ParseTuple(args, "")) + if ( kw && PyObject_IsTrue(kw) ) { + if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected")) return NULL; dict = kw; } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict)) @@ -574,8 +574,8 @@ nav_NavAskDiscardChanges(self, args, kw) NavEventUPP eventProc = NULL; OSErr err; - if ( kw ) { - if (!PyArg_ParseTuple(args, "")) + if ( kw && PyObject_IsTrue(kw) ) { + if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected")) return NULL; dict = kw; } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict)) @@ -610,8 +610,8 @@ nav_NavChooseFile(self, args, kw) NavTypeListHandle typeList = NULL; OSErr err; - if ( kw ) { - if (!PyArg_ParseTuple(args, "")) + if ( kw && PyObject_IsTrue(kw) ) { + if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected")) return NULL; dict = kw; } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict)) @@ -646,8 +646,8 @@ nav_NavChooseFolder(self, args, kw) NavObjectFilterUPP filterProc = NULL; OSErr err; - if ( kw ) { - if (!PyArg_ParseTuple(args, "")) + if ( kw && PyObject_IsTrue(kw) ) { + if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected")) return NULL; dict = kw; } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict)) @@ -682,8 +682,8 @@ nav_NavChooseVolume(self, args, kw) NavObjectFilterUPP filterProc = NULL; OSErr err; - if ( kw ) { - if (!PyArg_ParseTuple(args, "")) + if ( kw && PyObject_IsTrue(kw) ) { + if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected")) return NULL; dict = kw; } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict)) @@ -718,8 +718,8 @@ nav_NavChooseObject(self, args, kw) NavObjectFilterUPP filterProc = NULL; OSErr err; - if ( kw ) { - if (!PyArg_ParseTuple(args, "")) + if ( kw && PyObject_IsTrue(kw) ) { + if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected")) return NULL; dict = kw; } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict)) @@ -753,8 +753,8 @@ nav_NavNewFolder(self, args, kw) NavEventUPP eventProc = NULL; OSErr err; - if ( kw ) { - if (!PyArg_ParseTuple(args, "")) + if ( kw && PyObject_IsTrue(kw) ) { + if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected")) return NULL; dict = kw; } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict)) @@ -771,7 +771,7 @@ nav_NavNewFolder(self, args, kw) } #if 0 -XXXX I don't know what to do with the void * argument +/* XXXX I don't know what to do with the void * argument */ static char nav_NavCustomControl__doc__[] = "" ; |