[Python-Dev] Re: [Python-checkins]python/dist/src/Objects unicodeobject.c, 2.197, 2.198 (original) (raw)

M.-A. Lemburg mal at lemburg.com
Fri Sep 19 07:10:15 EDT 2003


Martin v. Löwis wrote:

"Tim Peters" <tim.one at comcast.net> writes:

That's fine for gcc then, so long as we don't branch on the contents of uninitialized memory, and we just fixed a bug of that sort.

If PyUNICODE ever resolves to a signed 2-byte type, though, the sign bit is still in play for legit contents. Right. I agree that we don't want to use a signed 2-byte type. Given that only MS uses a two-byte wchart (to my knowledge), and that theirs is unsigned, having an autoconf test to detect that this configuration is not supported is more than enough.

Since wchar_t is the only case where a signed type can pop up, why not extend the autoconf test to check for signedness and then reject signed wchar_t value as not-usable (ie. undefine HAVE_USABLE_WCHAR_T).

It looks to me as if this would resolve the problem once and for all. Signed values simply cause too many problems for this kind of application.

-- Marc-Andre Lemburg eGenix.com

Professional Python Software directly from the Source (#1, Sep 19 2003)

Python/Zope Products & Consulting ... http://www.egenix.com/ mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/


::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::



More information about the Python-Dev mailing list