summaryrefslogtreecommitdiffstats
path: root/Modules/_tkinter.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-03-31 03:29:39 (GMT)
committerGuido van Rossum <guido@python.org>2000-03-31 03:29:39 (GMT)
commit64231e5c39070ab4f8d92708cdc0b5799392b042 (patch)
tree45d57b37c3f639513211da1904c994f8118f990f /Modules/_tkinter.c
parent6148c2cfa67078c1d77ba46a8d145cc29d0fed5d (diff)
downloadcpython-64231e5c39070ab4f8d92708cdc0b5799392b042.zip
cpython-64231e5c39070ab4f8d92708cdc0b5799392b042.tar.gz
cpython-64231e5c39070ab4f8d92708cdc0b5799392b042.tar.bz2
Add back an obscure "feature" to the Obj version of Tkapp_Call(): a
None in an argument list *terminates* the argument list: further arguments are *ignored*. This isn't kosher, but too much code relies on it, implicitly. For example, IDLE was pretty broken.
Diffstat (limited to 'Modules/_tkinter.c')
-rw-r--r--Modules/_tkinter.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 47edf62..601a70c 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -604,6 +604,10 @@ Tkapp_Call(self, args)
for (i = 0; i < objc; i++) {
PyObject *v = PyTuple_GetItem(args, i);
+ if (v == Py_None) {
+ objc = i;
+ break;
+ }
objv[i] = AsObj(v);
if (!objv[i])
goto finally;