summaryrefslogtreecommitdiffstats
path: root/Modules/_tkinter.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-06-14 21:34:32 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2003-06-14 21:34:32 (GMT)
commitd6efae500ce3e955b95b324954defa1a9f2d9e96 (patch)
treee0d562478928d8e75f98f8117ecf3b8b1c0c38ec /Modules/_tkinter.c
parent19d173486b2263a269260343d65ac3929c89297e (diff)
downloadcpython-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/_tkinter.c')
-rw-r--r--Modules/_tkinter.c6
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);