[New-bugs-announce] [issue3015] tkinter with wantobjects=False has been broken for some time

Guilherme Polo report at bugs.python.org
Sat May 31 00:51:38 CEST 2008


New submission from Guilherme Polo <ggpolo at gmail.com>:

This affects only py3k, but apparently tkinter has been in this
situation for more than 9 months now.
I see these lines at _tkinter.c:

const char *s = Tcl_GetStringResult(self->interp);
const char *p = s;

res = PyUnicode_FromStringAndSize(s, (int)(p-s));

and I was wondering how could res not end up being an empty string
always ? Then I did some quick tests here and the return is always an
empty string, when wantobjects is set to False. Maybe the second line
should be:

const char *p = strchr(s, '\0');

I've attached this correction. Not sure if it is the best way to solve
the problem.

----------
components: Tkinter
files: tkinter_wantobjects.diff
keywords: patch
messages: 67562
nosy: gpolo
severity: normal
status: open
title: tkinter with wantobjects=False has been broken for some time
versions: Python 3.0
Added file: http://bugs.python.org/file10482/tkinter_wantobjects.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3015>
_______________________________________


More information about the New-bugs-announce mailing list