mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
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.
This commit is contained in:
parent
36550bdde9
commit
d183bdd6fb
6 changed files with 23 additions and 31 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue