Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:06:41

0001 #ifndef Py_LIMITED_API
0002 #ifndef PYCTYPE_H
0003 #define PYCTYPE_H
0004 #ifdef __cplusplus
0005 extern "C" {
0006 #endif
0007 
0008 #define PY_CTF_LOWER  0x01
0009 #define PY_CTF_UPPER  0x02
0010 #define PY_CTF_ALPHA  (PY_CTF_LOWER|PY_CTF_UPPER)
0011 #define PY_CTF_DIGIT  0x04
0012 #define PY_CTF_ALNUM  (PY_CTF_ALPHA|PY_CTF_DIGIT)
0013 #define PY_CTF_SPACE  0x08
0014 #define PY_CTF_XDIGIT 0x10
0015 
0016 PyAPI_DATA(const unsigned int) _Py_ctype_table[256];
0017 
0018 /* Unlike their C counterparts, the following macros are not meant to
0019  * handle an int with any of the values [EOF, 0-UCHAR_MAX]. The argument
0020  * must be a signed/unsigned char. */
0021 #define Py_ISLOWER(c)  (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_LOWER)
0022 #define Py_ISUPPER(c)  (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_UPPER)
0023 #define Py_ISALPHA(c)  (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_ALPHA)
0024 #define Py_ISDIGIT(c)  (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_DIGIT)
0025 #define Py_ISXDIGIT(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_XDIGIT)
0026 #define Py_ISALNUM(c)  (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_ALNUM)
0027 #define Py_ISSPACE(c)  (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_SPACE)
0028 
0029 PyAPI_DATA(const unsigned char) _Py_ctype_tolower[256];
0030 PyAPI_DATA(const unsigned char) _Py_ctype_toupper[256];
0031 
0032 #define Py_TOLOWER(c) (_Py_ctype_tolower[Py_CHARMASK(c)])
0033 #define Py_TOUPPER(c) (_Py_ctype_toupper[Py_CHARMASK(c)])
0034 
0035 #ifdef __cplusplus
0036 }
0037 #endif
0038 #endif /* !PYCTYPE_H */
0039 #endif /* !Py_LIMITED_API */