@@ -38,23 +38,15 @@ extern const char _Py_capitalize__doc__[];
3838extern const char _Py_swapcase__doc__ [];
3939extern const char _Py_maketrans__doc__ [];
4040
41- #define FLAG_LOWER 0x01
42- #define FLAG_UPPER 0x02
43- #define FLAG_ALPHA (FLAG_LOWER|FLAG_UPPER)
44- #define FLAG_DIGIT 0x04
45- #define FLAG_ALNUM (FLAG_ALPHA|FLAG_DIGIT)
46- #define FLAG_SPACE 0x08
47- #define FLAG_XDIGIT 0x10
48-
49- extern const unsigned int _Py_ctype_table [256 ];
50-
51- #define ISLOWER (c ) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_LOWER)
52- #define ISUPPER (c ) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_UPPER)
53- #define ISALPHA (c ) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_ALPHA)
54- #define ISDIGIT (c ) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_DIGIT)
55- #define ISXDIGIT (c ) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_XDIGIT)
56- #define ISALNUM (c ) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_ALNUM)
57- #define ISSPACE (c ) (_Py_ctype_table[Py_CHARMASK(c)] & FLAG_SPACE)
41+ /* These are left in for backward compatibility and will be removed
42+ in 2.8/3.2 */
43+ #define ISLOWER (c ) Py_ISLOWER(c)
44+ #define ISUPPER (c ) Py_ISUPPER(c)
45+ #define ISALPHA (c ) Py_ISALPHA(c)
46+ #define ISDIGIT (c ) Py_ISDIGIT(c)
47+ #define ISXDIGIT (c ) Py_ISXDIGIT(c)
48+ #define ISALNUM (c ) Py_ISALNUM(c)
49+ #define ISSPACE (c ) Py_ISSPACE(c)
5850
5951#undef islower
6052#define islower (c ) undefined_islower(c)
@@ -71,11 +63,10 @@ extern const unsigned int _Py_ctype_table[256];
7163#undef isspace
7264#define isspace (c ) undefined_isspace(c)
7365
74- extern const unsigned char _Py_ctype_tolower [256 ];
75- extern const unsigned char _Py_ctype_toupper [256 ];
76-
77- #define TOLOWER (c ) (_Py_ctype_tolower[Py_CHARMASK(c)])
78- #define TOUPPER (c ) (_Py_ctype_toupper[Py_CHARMASK(c)])
66+ /* These are left in for backward compatibility and will be removed
67+ in 2.8/3.2 */
68+ #define TOLOWER (c ) Py_TOLOWER(c)
69+ #define TOUPPER (c ) Py_TOUPPER(c)
7970
8071#undef tolower
8172#define tolower (c ) undefined_tolower(c)
0 commit comments