hirokazu.yamamoto
2008-11-18 04:33:04 UTC
Author: hirokazu.yamamoto
Date: Tue Nov 18 05:33:04 2008
New Revision: 67256
Log:
Issue #4313: Fixed segfault on IDLE exit. Reverted r57540 and reopened Issue #1028.
Modified:
python/branches/py3k/Modules/_tkinter.c
Modified: python/branches/py3k/Modules/_tkinter.c
==============================================================================
--- python/branches/py3k/Modules/_tkinter.c (original)
+++ python/branches/py3k/Modules/_tkinter.c Tue Nov 18 05:33:04 2008
@@ -1906,7 +1906,7 @@
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 @@
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);
Date: Tue Nov 18 05:33:04 2008
New Revision: 67256
Log:
Issue #4313: Fixed segfault on IDLE exit. Reverted r57540 and reopened Issue #1028.
Modified:
python/branches/py3k/Modules/_tkinter.c
Modified: python/branches/py3k/Modules/_tkinter.c
==============================================================================
--- python/branches/py3k/Modules/_tkinter.c (original)
+++ python/branches/py3k/Modules/_tkinter.c Tue Nov 18 05:33:04 2008
@@ -1906,7 +1906,7 @@
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 @@
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);