summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2008-11-18 04:33:04 (GMT)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2008-11-18 04:33:04 (GMT)
commitde60347b666a96ec3677c93576e8d97d56cf0c6e (patch)
tree71b24c43b217951e8ee10fbf6047b204d9c2a029 /Modules
parente56131b60e6c2e63bcb6ecc2a6b7964d74ab847d (diff)
downloadcpython-de60347b666a96ec3677c93576e8d97d56cf0c6e.zip
cpython-de60347b666a96ec3677c93576e8d97d56cf0c6e.tar.gz
cpython-de60347b666a96ec3677c93576e8d97d56cf0c6e.tar.bz2
Issue #4313: Fixed segfault on IDLE exit. Reverted r57540 and reopened Issue #1028.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_tkinter.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 3bbc7e4..dfafed5 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -1906,7 +1906,7 @@ static int
PythonCmd(ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
{
PythonCmd_ClientData *data = (PythonCmd_ClientData *)clientData;
- PyObject *self, *func, *arg, *res, *s;
+ PyObject *self, *func, *arg, *res;
int i, rv;
Tcl_Obj *obj_res;
@@ -1923,13 +1923,7 @@ PythonCmd(ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
return PythonCmd_Error(interp);
for (i = 0; i < (argc - 1); i++) {
- if (11 == (i + 1)) { /* the %A arg is the unicode char */
- char *a = argv[i + 1];
- s = PyUnicode_FromUnicode((Py_UNICODE *) a, strlen(a));
- }
- else {
- s = PyUnicode_FromString(argv[i + 1]);
- }
+ PyObject *s = PyUnicode_FromString(argv[i + 1]);
if (!s || PyTuple_SetItem(arg, i, s)) {
Py_DECREF(arg);
return PythonCmd_Error(interp);