This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients eric.smith, loewis, pitrou, r.david.murray, skrah, srid
Date 2010-06-19.12:16:51
SpamBayes Score 0.0049561234
Marked as misclassified No
Message-id <1276949813.63.0.9361433769.issue9020@psf.upfronthosting.co.za>
In-reply-to
Content
> Why do you say that? If c is -1, then Py_CHARMASK(c) is 255, which is a
> positive integer.

What srid seems to be saying is that chars are unsigned on AIX, and therefore Py_CHARMASK() returns -1. Hence his patch proposal.

Of course, it is dubious why EOF is not tested separately rather than passing it to Py_ISALNUM(). Micro-optimization? At least a comment should be added.

Also, really, the Py_CHARMASK() macro seems poorly specified. It claims to "convert a possibly signed character to a nonnegative int", but this is wrong: it doesn't convert to an int at all. Furthermore, it does a cast in one branch but not in the other, which can give bad surprises as here.
History
Date User Action Args
2010-06-19 12:16:53pitrousetrecipients: + pitrou, loewis, eric.smith, r.david.murray, srid, skrah
2010-06-19 12:16:53pitrousetmessageid: <1276949813.63.0.9361433769.issue9020@psf.upfronthosting.co.za>
2010-06-19 12:16:52pitroulinkissue9020 messages
2010-06-19 12:16:51pitroucreate