cpython: 9683d59170ee (original) (raw)
Mercurial > cpython
changeset 74301:9683d59170ee
Issue #13738: Simplify implementation of bytes.lower() and bytes.upper(). [#13738]
Antoine Pitrou solipsis@pitrou.net | |
---|---|
date | Sun, 08 Jan 2012 16:22:46 +0100 |
parents | 25f879011102 |
children | 7b2a178c028b |
files | Misc/NEWS Objects/bytes_methods.c |
diffstat | 2 files changed, 4 insertions(+), 10 deletions(-)[+] [-] Misc/NEWS 2 Objects/bytes_methods.c 12 |
line wrap: on
line diff
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,8 @@ What's New in Python 3.3 Alpha 1? Core and Builtins ----------------- +- Issue #13738: Simplify implementation of bytes.lower() and bytes.upper(). +
--- a/Objects/bytes_methods.c +++ b/Objects/bytes_methods.c @@ -248,12 +248,8 @@ void { Py_ssize_t i;
int c = Py_CHARMASK(result[i]);[](#l2.10)
if (Py_ISUPPER(c))[](#l2.11)
result[i] = Py_TOLOWER(c);[](#l2.12)
} } @@ -268,12 +264,8 @@ void { Py_ssize_t i;result[i] = Py_TOLOWER((unsigned char) cptr[i]);[](#l2.13)
int c = Py_CHARMASK(result[i]);[](#l2.24)
if (Py_ISLOWER(c))[](#l2.25)
result[i] = Py_TOUPPER(c);[](#l2.26)