[issue9036] Simplify Py_CHARMASK
Antoine Pitrou
report at bugs.python.org
Sun Jun 20 15:27:04 CEST 2010
Antoine Pitrou <pitrou at free.fr> added the comment:
> Thus,
> ((unsigned char)((c) & 0xff)) and ((unsigned char)(c)) should produce
> the same results.
If it's the case, it's probably optimized away by the compiler anyway.
> There is no reason not to do the cast when __CHAR_UNSIGNED__ is
> defined (it will be a no-op).
Agreed. It also reduces the opportunity for bugs :)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9036>
_______________________________________
More information about the Python-bugs-list
mailing list