diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2003-06-14 21:34:32 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2003-06-14 21:34:32 (GMT) |
commit | d6efae500ce3e955b95b324954defa1a9f2d9e96 (patch) | |
tree | e0d562478928d8e75f98f8117ecf3b8b1c0c38ec /Modules | |
parent | 19d173486b2263a269260343d65ac3929c89297e (diff) | |
download | cpython-d6efae500ce3e955b95b324954defa1a9f2d9e96.zip cpython-d6efae500ce3e955b95b324954defa1a9f2d9e96.tar.gz cpython-d6efae500ce3e955b95b324954defa1a9f2d9e96.tar.bz2 |
Properly deal with tuples in Open._fixresult. Fixes bug reported in
follow-up to #621891.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_tkinter.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index 5851372..5253a10 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -2604,9 +2604,11 @@ static PyObject * Tkapp_WantObjects(PyObject *self, PyObject *args) { - int wantobjects; - if (!PyArg_ParseTuple(args, "i:wantobjects", &wantobjects)) + int wantobjects = -1; + if (!PyArg_ParseTuple(args, "|i:wantobjects", &wantobjects)) return NULL; + if (wantobjects == -1) + return PyBool_FromLong(((TkappObject*)self)->wantobjects); ((TkappObject*)self)->wantobjects = wantobjects; Py_INCREF(Py_None); |