#12266: merge with 3.2.

This commit is contained in:
Ezio Melotti 2011-08-15 09:26:28 +03:00
commit 269e3ee3db
3 changed files with 22 additions and 2 deletions

View file

@ -6733,13 +6733,13 @@ fixcapitalize(PyUnicodeObject *self)
if (len == 0)
return 0;
if (Py_UNICODE_ISLOWER(*s)) {
if (!Py_UNICODE_ISUPPER(*s)) {
*s = Py_UNICODE_TOUPPER(*s);
status = 1;
}
s++;
while (--len > 0) {
if (Py_UNICODE_ISUPPER(*s)) {
if (!Py_UNICODE_ISLOWER(*s)) {
*s = Py_UNICODE_TOLOWER(*s);
status = 1;
}