diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-12-03 21:09:27 +0100 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-12-03 21:09:27 +0100 |
commit | dca07911b29139fc1eef66cc366d0e0ead3b8853 (patch) | |
tree | 84522a8ccb17f601f72993cbfe6cd4dda5bf5786 /Python/fileutils.c | |
parent | 6d19a84e20bd332bcc35385f3986865336e7ed02 (diff) | |
parent | 3575597ccfa3f7a6cca57ee738198c4047a4cfce (diff) | |
download | cpython-dca07911b29139fc1eef66cc366d0e0ead3b8853.tar.gz |
Fix test splitting in previous commit.
Diffstat (limited to 'Python/fileutils.c')
-rw-r--r-- | Python/fileutils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/fileutils.c b/Python/fileutils.c index 2e9ea359da..2cd75ce163 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -101,7 +101,7 @@ _Py_char2wchar(const char* arg, size_t *size) /* Only use the result if it contains no surrogate characters. */ for (tmp = res; *tmp != 0 && - (*tmp < 0xd800 || *tmp > 0xdfff); tmp++) + !Py_UNICODE_IS_SURROGATE(*tmp); tmp++) ; if (*tmp == 0) { if (size != NULL) @@ -147,7 +147,7 @@ _Py_char2wchar(const char* arg, size_t *size) memset(&mbs, 0, sizeof mbs); continue; } - if (*out >= 0xd800 && *out <= 0xdfff) { + if (Py_UNICODE_IS_SURROGATE(*out)) { /* Surrogate character. Escape the original byte sequence with surrogateescape. */ argsize -= converted; |