Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 445a623

Browse files
author
Victor Stinner
committed
Fix my previous commit (r80382) for wide build (unicodeobject.c)
1 parent 31be90b commit 445a623

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Objects/unicodeobject.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2562,9 +2562,8 @@ PyUnicode_EncodeUTF8(const Py_UNICODE *s,
25622562
*p++ = (char)(0x80 | ((ch >> 12) & 0x3f));
25632563
*p++ = (char)(0x80 | ((ch >> 6) & 0x3f));
25642564
*p++ = (char)(0x80 | (ch & 0x3f));
2565-
2566-
#endif
25672565
} else {
2566+
#endif
25682567
Py_ssize_t newpos;
25692568
PyObject *rep;
25702569
Py_ssize_t repsize, k;
@@ -2624,7 +2623,9 @@ PyUnicode_EncodeUTF8(const Py_UNICODE *s,
26242623
}
26252624
}
26262625
Py_DECREF(rep);
2626+
#ifndef Py_UNICODE_WIDE
26272627
}
2628+
#endif
26282629
} else if (ch < 0x10000) {
26292630
*p++ = (char)(0xe0 | (ch >> 12));
26302631
*p++ = (char)(0x80 | ((ch >> 6) & 0x3f));

0 commit comments

Comments
 (0)