]> granicus.if.org Git - python/commit
Issue #9036: Throughout the code base, Py_CHARMASK is used on 8-bit wide
authorStefan Krah <stefan@bytereef.org>
Mon, 19 Jul 2010 13:14:01 +0000 (13:14 +0000)
committerStefan Krah <stefan@bytereef.org>
Mon, 19 Jul 2010 13:14:01 +0000 (13:14 +0000)
commita1775944ae4f9770aa5980a2c2a5454d3994db25
treecd482727ae2d73521932b143f09ec85cd3b737a5
parent682f60352e782dae1c01e8b77a6150ef5669ee74
Issue #9036: Throughout the code base, Py_CHARMASK is used on 8-bit wide
signed/unsigned chars or on integers directly derived from those. In all
cases, it could be replaced by a simple cast to (unsigned char). Reasons
for the change:

  a) Make the comment more explicit.

  b) If char is unsigned, the cast is optimized away.

  c) If char is unsigned, gcc emits spurious "array subscript
     has type 'char'" warnings.
Include/Python.h