mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +00:00
Remove "#ifdef Py_UNICODE_WIDE": Python is now always wide
This commit is contained in:
parent
0d3721d986
commit
63ab875cfe
3 changed files with 8 additions and 25 deletions
|
@ -526,23 +526,17 @@ dump_ascii(int fd, PyObject *text)
|
|||
char c = (char)ch;
|
||||
write(fd, &c, 1);
|
||||
}
|
||||
else if (ch < 256) {
|
||||
else if (ch < 0xff) {
|
||||
PUTS(fd, "\\x");
|
||||
dump_hexadecimal(2, ch, fd);
|
||||
}
|
||||
else
|
||||
#ifdef Py_UNICODE_WIDE
|
||||
if (ch < 65536)
|
||||
#endif
|
||||
{
|
||||
else if (ch < 0xffff) {
|
||||
PUTS(fd, "\\u");
|
||||
dump_hexadecimal(4, ch, fd);
|
||||
#ifdef Py_UNICODE_WIDE
|
||||
}
|
||||
else {
|
||||
PUTS(fd, "\\U");
|
||||
dump_hexadecimal(8, ch, fd);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (truncated)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue