diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2008-03-28 04:58:51 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2008-03-28 04:58:51 (GMT) |
commit | d183bdd6fb77ae562714c655f0689beacdc00da1 (patch) | |
tree | fefb66dad02e0e67e3060459b4501a70f455eb00 /Parser | |
parent | 36550bdde947ef7cad57d1375fbcf6096b017231 (diff) | |
download | cpython-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 'Parser')
-rw-r--r-- | Parser/tokenizer.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 799db20..29fb114 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -27,14 +27,6 @@ extern char *PyOS_Readline(FILE *, FILE *, char *); /* Don't ever change this -- it would break the portability of Python code */ #define TABSIZE 8 -/* Convert a possibly signed character to a nonnegative int */ -/* XXX This assumes characters are 8 bits wide */ -#ifdef __CHAR_UNSIGNED__ -#define Py_CHARMASK(c) (c) -#else -#define Py_CHARMASK(c) ((c) & 0xff) -#endif - /* Forward */ static struct tok_state *tok_new(void); static int tok_nextc(struct tok_state *tok); |