diff options
author | Eric Smith <eric@trueblade.com> | 2009-04-27 20:39:49 (GMT) |
---|---|---|
committer | Eric Smith <eric@trueblade.com> | 2009-04-27 20:39:49 (GMT) |
commit | 6dc46f5eaa14c8aa33b8ae5b41642a00a1b25807 (patch) | |
tree | fc063968e5d131487c7418647e2cf4abf942cdff /Objects/bytearrayobject.c | |
parent | 249b898ec7839cc022d5d0b7638284663a6edfb7 (diff) | |
download | cpython-6dc46f5eaa14c8aa33b8ae5b41642a00a1b25807.zip cpython-6dc46f5eaa14c8aa33b8ae5b41642a00a1b25807.tar.gz cpython-6dc46f5eaa14c8aa33b8ae5b41642a00a1b25807.tar.bz2 |
Merged revisions 72040 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r72040 | eric.smith | 2009-04-27 15:04:37 -0400 (Mon, 27 Apr 2009) | 1 line
Issue #5793: rationalize isdigit / isalpha / tolower, etc. Will port to py3k. Should fix Windows buildbot errors.
........
Diffstat (limited to 'Objects/bytearrayobject.c')
-rw-r--r-- | Objects/bytearrayobject.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index 8daf611..165fd10 100644 --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c @@ -2176,16 +2176,16 @@ split_whitespace(const char *s, Py_ssize_t len, Py_ssize_t maxcount) for (i = j = 0; i < len; ) { /* find a token */ - while (i < len && ISSPACE(s[i])) + while (i < len && Py_ISSPACE(s[i])) i++; j = i; - while (i < len && !ISSPACE(s[i])) + while (i < len && !Py_ISSPACE(s[i])) i++; if (j < i) { if (maxcount-- <= 0) break; SPLIT_ADD(s, j, i); - while (i < len && ISSPACE(s[i])) + while (i < len && Py_ISSPACE(s[i])) i++; j = i; } @@ -2410,16 +2410,16 @@ rsplit_whitespace(const char *s, Py_ssize_t len, Py_ssize_t maxcount) for (i = j = len - 1; i >= 0; ) { /* find a token */ - while (i >= 0 && ISSPACE(s[i])) + while (i >= 0 && Py_ISSPACE(s[i])) i--; j = i; - while (i >= 0 && !ISSPACE(s[i])) + while (i >= 0 && !Py_ISSPACE(s[i])) i--; if (j > i) { if (maxcount-- <= 0) break; SPLIT_ADD(s, i + 1, j + 1); - while (i >= 0 && ISSPACE(s[i])) + while (i >= 0 && Py_ISSPACE(s[i])) i--; j = i; } @@ -2986,11 +2986,11 @@ hex_digit_to_int(Py_UNICODE c) { if (c >= 128) return -1; - if (ISDIGIT(c)) + if (Py_ISDIGIT(c)) return c - '0'; else { - if (ISUPPER(c)) - c = TOLOWER(c); + if (Py_ISUPPER(c)) + c = Py_TOLOWER(c); if (c >= 'a' && c <= 'f') return c - 'a' + 10; } |