summaryrefslogtreecommitdiffstats
path: root/Include/Python.h
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2008-03-28 04:58:51 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2008-03-28 04:58:51 (GMT)
commitd183bdd6fb77ae562714c655f0689beacdc00da1 (patch)
treefefb66dad02e0e67e3060459b4501a70f455eb00 /Include/Python.h
parent36550bdde947ef7cad57d1375fbcf6096b017231 (diff)
downloadcpython-d183bdd6fb77ae562714c655f0689beacdc00da1.zip
cpython-d183bdd6fb77ae562714c655f0689beacdc00da1.tar.gz
cpython-d183bdd6fb77ae562714c655f0689beacdc00da1.tar.bz2
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.
Diffstat (limited to 'Include/Python.h')
-rw-r--r--Include/Python.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/Python.h b/Include/Python.h
index a5e2853..4cffda3 100644
--- a/Include/Python.h
+++ b/Include/Python.h
@@ -148,7 +148,7 @@ PyAPI_FUNC(PyObject*) _Py_Mangle(PyObject *p, PyObject *name);
#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"