mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Properly deal with tuples in Open._fixresult. Fixes bug reported in
follow-up to #621891.
This commit is contained in:
parent
19d173486b
commit
d6efae500c
2 changed files with 20 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue