Mercurial > cpython-lru_cache-weakref
diff Include/Python.h @ 46149:7fdff02e6f45 legacy-trunk
Revert r61969 which added casts to Py_CHARMASK to avoid compiler warnings.
Rather than sprinkle casts throughout the code, change Py_CHARMASK to
always cast it's result to an unsigned char. This should ensure we
do the right thing when accessing an array with the result.
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Fri, 28 Mar 2008 04:58:51 +0000 |
| parents | 5341b30b1812 |
| children | 840064802952 |
line wrap: on
line diff
--- a/Include/Python.h Fri Mar 28 04:53:10 2008 +0000 +++ b/Include/Python.h Fri Mar 28 04:58:51 2008 +0000 @@ -148,7 +148,7 @@ #ifdef __CHAR_UNSIGNED__ #define Py_CHARMASK(c) (c) #else -#define Py_CHARMASK(c) ((c) & 0xff) +#define Py_CHARMASK(c) ((unsigned char)((c) & 0xff)) #endif #include "pyfpe.h"
