Mercurial > cpython-lru_cache-weakref
diff Objects/unicodeobject.c @ 65980:d31eaec883eb
Issue #10288: The deprecated family of "char"-handling macros
(ISLOWER()/ISUPPER()/etc) have now been removed: use Py_ISLOWER() etc
instead.
| author | David Malcolm <dmalcolm@redhat.com> |
|---|---|
| date | Fri, 05 Nov 2010 17:23:41 +0000 |
| parents | 05eed9f0ce01 |
| children | 70425fd47856 |
line wrap: on
line diff
--- a/Objects/unicodeobject.c Fri Nov 05 17:22:46 2010 +0000 +++ b/Objects/unicodeobject.c Fri Nov 05 17:23:41 2010 +0000 @@ -757,9 +757,9 @@ continue; if (*(f+1)=='S' || *(f+1)=='R' || *(f+1)=='A') ++callcount; - while (ISDIGIT((unsigned)*f)) + while (Py_ISDIGIT((unsigned)*f)) width = (width*10) + *f++ - '0'; - while (*++f && *f != '%' && !ISALPHA((unsigned)*f)) + while (*++f && *f != '%' && !Py_ISALPHA((unsigned)*f)) ; if (*f == 's') ++callcount; @@ -790,9 +790,9 @@ #endif const char* p = f; width = 0; - while (ISDIGIT((unsigned)*f)) + while (Py_ISDIGIT((unsigned)*f)) width = (width*10) + *f++ - '0'; - while (*++f && *f != '%' && !ISALPHA((unsigned)*f)) + while (*++f && *f != '%' && !Py_ISALPHA((unsigned)*f)) ; /* skip the 'l' or 'z' in {%ld, %zd, %lu, %zu} since @@ -965,12 +965,12 @@ zeropad = (*f == '0'); /* parse the width.precision part */ width = 0; - while (ISDIGIT((unsigned)*f)) + while (Py_ISDIGIT((unsigned)*f)) width = (width*10) + *f++ - '0'; precision = 0; if (*f == '.') { f++; - while (ISDIGIT((unsigned)*f)) + while (Py_ISDIGIT((unsigned)*f)) precision = (precision*10) + *f++ - '0'; } /* Handle %ld, %lu, %lld and %llu. */ @@ -1419,8 +1419,8 @@ while (*e) { if (l == l_end) return 0; - if (ISUPPER(*e)) { - *l++ = TOLOWER(*e++); + if (Py_ISUPPER(*e)) { + *l++ = Py_TOLOWER(*e++); } else if (*e == '_') { *l++ = '-'; @@ -3790,7 +3790,7 @@ } for (i = 0; i < digits; ++i) { c = (unsigned char) s[i]; - if (!ISXDIGIT(c)) { + if (!Py_ISXDIGIT(c)) { endinpos = (s+i+1)-starts; if (unicode_decode_call_errorhandler( errors, &errorHandler, @@ -4156,7 +4156,7 @@ outpos = p-PyUnicode_AS_UNICODE(v); for (x = 0, i = 0; i < count; ++i, ++s) { c = (unsigned char)*s; - if (!ISXDIGIT(c)) { + if (!Py_ISXDIGIT(c)) { endinpos = s-starts; if (unicode_decode_call_errorhandler( errors, &errorHandler,
