mirror of
https://github.com/python/cpython.git
synced 2025-11-14 07:49:28 +00:00
Add specification for the Py_IS* macros in pyctype.h.
This commit is contained in:
parent
ce8b3f7c01
commit
2f7105dde7
1 changed files with 3 additions and 0 deletions
|
|
@ -11,6 +11,9 @@
|
||||||
|
|
||||||
extern const unsigned int _Py_ctype_table[256];
|
extern const unsigned int _Py_ctype_table[256];
|
||||||
|
|
||||||
|
/* Unlike their C counterparts, the following macros are not meant to
|
||||||
|
* handle an int with any of the values [EOF, 0-UCHAR_MAX]. The argument
|
||||||
|
* must be a signed/unsigned char. */
|
||||||
#define Py_ISLOWER(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_LOWER)
|
#define Py_ISLOWER(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_LOWER)
|
||||||
#define Py_ISUPPER(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_UPPER)
|
#define Py_ISUPPER(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_UPPER)
|
||||||
#define Py_ISALPHA(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_ALPHA)
|
#define Py_ISALPHA(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_ALPHA)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue