mirror of
https://github.com/python/cpython.git
synced 2025-07-31 23:23:11 +00:00
Fix warnings about using char as an array subscript. This is not portable
since char is signed on some platforms and unsigned on others.
This commit is contained in:
parent
4ebd46a02d
commit
231346e23f
4 changed files with 22 additions and 22 deletions
|
@ -44,13 +44,13 @@ extern const char _Py_swapcase__doc__[];
|
|||
|
||||
extern const unsigned int _Py_ctype_table[256];
|
||||
|
||||
#define ISLOWER(c) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_LOWER)
|
||||
#define ISUPPER(c) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_UPPER)
|
||||
#define ISALPHA(c) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_ALPHA)
|
||||
#define ISDIGIT(c) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_DIGIT)
|
||||
#define ISXDIGIT(c) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_XDIGIT)
|
||||
#define ISALNUM(c) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_ALNUM)
|
||||
#define ISSPACE(c) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_SPACE)
|
||||
#define ISLOWER(c) (_Py_ctype_table[(unsigned)Py_CHARMASK(c)] & FLAG_LOWER)
|
||||
#define ISUPPER(c) (_Py_ctype_table[(unsigned)Py_CHARMASK(c)] & FLAG_UPPER)
|
||||
#define ISALPHA(c) (_Py_ctype_table[(unsigned)Py_CHARMASK(c)] & FLAG_ALPHA)
|
||||
#define ISDIGIT(c) (_Py_ctype_table[(unsigned)Py_CHARMASK(c)] & FLAG_DIGIT)
|
||||
#define ISXDIGIT(c) (_Py_ctype_table[(unsigned)Py_CHARMASK(c)] & FLAG_XDIGIT)
|
||||
#define ISALNUM(c) (_Py_ctype_table[(unsigned)Py_CHARMASK(c)] & FLAG_ALNUM)
|
||||
#define ISSPACE(c) (_Py_ctype_table[(unsigned)Py_CHARMASK(c)] & FLAG_SPACE)
|
||||
|
||||
#undef islower
|
||||
#define islower(c) undefined_islower(c)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue