summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2007-07-05 22:03:39 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2007-07-05 22:03:39 (GMT)
commitd67a3b9503276205857c38f6c1dc5ad20ea1e885 (patch)
tree7e3075726219cb9150439b2c60d9580a414dc28b /Modules
parente81119295eceabc79ca2333ae6d32aad7bf8d877 (diff)
downloadcpython-d67a3b9503276205857c38f6c1dc5ad20ea1e885.zip
cpython-d67a3b9503276205857c38f6c1dc5ad20ea1e885.tar.gz
cpython-d67a3b9503276205857c38f6c1dc5ad20ea1e885.tar.bz2
Many calls to tk.call involve an arglist containing a single tuple.
Calls using METH_OLDARGS unpack this tuple; calls using METH_VARARG don't. Tcl's concatenation of args was affected; IDLE doesn't start. Modify Tkapp_Call() to unpack single tuple arglists. Bug 1733943 Ref http://mail.python.org/pipermail/python-checkins/2007-May/060454.html
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_tkinter.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 1f94929..22d930b 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -1285,6 +1285,12 @@ Tkapp_Call(PyObject *selfptr, PyObject *args)
/* Could add TCL_EVAL_GLOBAL if wrapped by GlobalCall... */
int flags = TCL_EVAL_DIRECT;
+ /* If args is a single tuple, replace with contents of tuple */
+ if (1 == PyTuple_Size(args)){
+ PyObject* item = PyTuple_GetItem(args, 0);
+ if (PyTuple_Check(item))
+ args = item;
+ }
#ifdef WITH_THREAD
if (self->threaded && self->thread_id != Tcl_GetCurrentThread()) {
/* We cannot call the command directly. Instead, we must