diff options
author | Marc-André Lemburg <mal@egenix.com> | 2000-07-05 09:45:59 (GMT) |
---|---|---|
committer | Marc-André Lemburg <mal@egenix.com> | 2000-07-05 09:45:59 (GMT) |
commit | f03e74126e5702edab33148140e84d21471424ce (patch) | |
tree | 4e104f6d2498bd137a3e7907744c1f9e7babb55b /Include | |
parent | 82249c83891d86af179d0ff06bfb11d783cbd997 (diff) | |
download | cpython-f03e74126e5702edab33148140e84d21471424ce.zip cpython-f03e74126e5702edab33148140e84d21471424ce.tar.gz cpython-f03e74126e5702edab33148140e84d21471424ce.tar.bz2 |
Modified the ISALPHA and ISALNUM macros to use the new lookup APIs
from unicodectype.c
Diffstat (limited to 'Include')
-rw-r--r-- | Include/unicodeobject.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h index f076fae..74cb033 100644 --- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -137,6 +137,8 @@ typedef unsigned short Py_UNICODE; #define Py_UNICODE_TODIGIT(ch) _PyUnicode_ToDigit(ch) #define Py_UNICODE_TONUMERIC(ch) _PyUnicode_ToNumeric(ch) +#define Py_UNICODE_ISALPHA(ch) iswalpha(ch) + #else #define Py_UNICODE_ISSPACE(ch) _PyUnicode_IsWhitespace(ch) @@ -158,12 +160,9 @@ typedef unsigned short Py_UNICODE; #define Py_UNICODE_TODIGIT(ch) _PyUnicode_ToDigit(ch) #define Py_UNICODE_TONUMERIC(ch) _PyUnicode_ToNumeric(ch) -#endif +#define Py_UNICODE_ISALPHA(ch) _PyUnicode_IsAlpha(ch) -#define Py_UNICODE_ISALPHA(ch) \ - (Py_UNICODE_ISLOWER(ch) || \ - Py_UNICODE_ISUPPER(ch) || \ - Py_UNICODE_ISTITLE(ch)) +#endif #define Py_UNICODE_ISALNUM(ch) \ (Py_UNICODE_ISALPHA(ch) || \ @@ -871,6 +870,10 @@ extern DL_IMPORT(int) _PyUnicode_IsNumeric( register const Py_UNICODE ch /* Unicode character */ ); +extern DL_IMPORT(int) _PyUnicode_IsAlpha( + register const Py_UNICODE ch /* Unicode character */ + ); + #ifdef __cplusplus } #endif |