[Python-Dev] Re: [Python-checkins]python/dist/src/Objects unicodeobject.c, 2.197, 2.198 (original) (raw)
Tim Peters tim.one at comcast.net
Thu Sep 18 11🔞43 EDT 2003
- Previous message: [Python-Dev] Re: [Python-checkins]python/dist/src/Objects unicodeobject.c, 2.197, 2.198
- Next message: [Python-Dev] Re: [Python-checkins]python/dist/src/Objects unicodeobject.c, 2.197, 2.198
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I think people have learned, over time, that negative characters are evil. So MS chose to make wchart unsigned, as, for 2-byte Unicode, you might otherwise run into negative characters. For gcc, people probably also agree that negative characters are evil, but using long int causes no harm here: All assigned characters are still positive, as Unicode goes only up to 2**21.
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 Py_UNICODE ever resolves to a signed 2-byte type, though, the sign bit is still in play for legit contents.
- Previous message: [Python-Dev] Re: [Python-checkins]python/dist/src/Objects unicodeobject.c, 2.197, 2.198
- Next message: [Python-Dev] Re: [Python-checkins]python/dist/src/Objects unicodeobject.c, 2.197, 2.198
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]