diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-05-16 06:42:29 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-05-16 06:42:29 (GMT) |
commit | bcde10aa7e47da68afb68fe75c65b9339dd89f86 (patch) | |
tree | ebef495abc0010a3b9f028627c9d8f115d93dafc /Objects/stringlib/find_max_char.h | |
parent | cbcc2fd641de178e139b59f0c08bb738e9d4835e (diff) | |
download | cpython-bcde10aa7e47da68afb68fe75c65b9339dd89f86.zip cpython-bcde10aa7e47da68afb68fe75c65b9339dd89f86.tar.gz cpython-bcde10aa7e47da68afb68fe75c65b9339dd89f86.tar.bz2 |
Issue #26765: Ensure that bytes- and unicode-specific stringlib files are used
with correct type.
Diffstat (limited to 'Objects/stringlib/find_max_char.h')
-rw-r--r-- | Objects/stringlib/find_max_char.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/stringlib/find_max_char.h b/Objects/stringlib/find_max_char.h index eb3fe88..8ccbc30 100644 --- a/Objects/stringlib/find_max_char.h +++ b/Objects/stringlib/find_max_char.h @@ -1,6 +1,8 @@ /* Finding the optimal width of unicode characters in a buffer */ -#if STRINGLIB_IS_UNICODE +#if !STRINGLIB_IS_UNICODE +# error "find_max_char.h is specific to Unicode" +#endif /* Mask to quickly check whether a C 'long' contains a non-ASCII, UTF8-encoded char. */ @@ -129,5 +131,4 @@ STRINGLIB(find_max_char)(const STRINGLIB_CHAR *begin, const STRINGLIB_CHAR *end) #undef MAX_CHAR_UCS4 #endif /* STRINGLIB_SIZEOF_CHAR == 1 */ -#endif /* STRINGLIB_IS_UNICODE */ |