Properly deal with tuples in Open._fixresult. Fixes bug reported in

follow-up to #621891.
This commit is contained in:
Martin v. Löwis 2003-06-14 21:34:32 +00:00
parent 19d173486b
commit d6efae500c
2 changed files with 20 additions and 5 deletions

View file

@ -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);