mirror of
https://github.com/python/cpython.git
synced 2025-09-14 12:46:49 +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
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue