Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
bcde10aa
Commit
bcde10aa
authored
May 16, 2016
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #26765: Ensure that bytes- and unicode-specific stringlib files are used
with correct type.
parent
cbcc2fd6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
12 deletions
+15
-12
Objects/stringlib/codecs.h
Objects/stringlib/codecs.h
+3
-3
Objects/stringlib/ctype.h
Objects/stringlib/ctype.h
+3
-2
Objects/stringlib/find_max_char.h
Objects/stringlib/find_max_char.h
+3
-2
Objects/stringlib/join.h
Objects/stringlib/join.h
+1
-1
Objects/stringlib/localeutil.h
Objects/stringlib/localeutil.h
+2
-2
Objects/stringlib/transmogrify.h
Objects/stringlib/transmogrify.h
+3
-2
No files found.
Objects/stringlib/codecs.h
View file @
bcde10aa
/* stringlib: codec implementations */
/* stringlib: codec implementations */
#if STRINGLIB_IS_UNICODE
#if !STRINGLIB_IS_UNICODE
# error "codecs.h is specific to Unicode"
#endif
/* Mask to quickly check whether a C 'long' contains a
/* Mask to quickly check whether a C 'long' contains a
non-ASCII, UTF8-encoded char. */
non-ASCII, UTF8-encoded char. */
...
@@ -823,5 +825,3 @@ STRINGLIB(utf32_encode)(const STRINGLIB_CHAR *in,
...
@@ -823,5 +825,3 @@ STRINGLIB(utf32_encode)(const STRINGLIB_CHAR *in,
#undef SWAB4
#undef SWAB4
#endif
#endif
#endif
/* STRINGLIB_IS_UNICODE */
Objects/stringlib/ctype.h
View file @
bcde10aa
/* NOTE: this API is -ONLY- for use with single byte character strings. */
#if STRINGLIB_IS_UNICODE
/* Do not use it with Unicode. */
# error "ctype.h only compatible with byte-wise strings"
#endif
#include "bytes_methods.h"
#include "bytes_methods.h"
...
...
Objects/stringlib/find_max_char.h
View file @
bcde10aa
/* Finding the optimal width of unicode characters in a buffer */
/* 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
/* Mask to quickly check whether a C 'long' contains a
non-ASCII, UTF8-encoded char. */
non-ASCII, UTF8-encoded char. */
...
@@ -129,5 +131,4 @@ STRINGLIB(find_max_char)(const STRINGLIB_CHAR *begin, const STRINGLIB_CHAR *end)
...
@@ -129,5 +131,4 @@ STRINGLIB(find_max_char)(const STRINGLIB_CHAR *begin, const STRINGLIB_CHAR *end)
#undef MAX_CHAR_UCS4
#undef MAX_CHAR_UCS4
#endif
/* STRINGLIB_SIZEOF_CHAR == 1 */
#endif
/* STRINGLIB_SIZEOF_CHAR == 1 */
#endif
/* STRINGLIB_IS_UNICODE */
Objects/stringlib/join.h
View file @
bcde10aa
/* stringlib: bytes joining implementation */
/* stringlib: bytes joining implementation */
#if STRINGLIB_
SIZEOF_CHAR != 1
#if STRINGLIB_
IS_UNICODE
#error join.h only compatible with byte-wise strings
#error join.h only compatible with byte-wise strings
#endif
#endif
...
...
Objects/stringlib/localeutil.h
View file @
bcde10aa
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
#include <locale.h>
#include <locale.h>
#if
ndef
STRINGLIB_IS_UNICODE
#if
!
STRINGLIB_IS_UNICODE
# error "localeutil is specific to Unicode"
# error "localeutil
.h
is specific to Unicode"
#endif
#endif
typedef
struct
{
typedef
struct
{
...
...
Objects/stringlib/transmogrify.h
View file @
bcde10aa
/* NOTE: this API is -ONLY- for use with single byte character strings. */
#if STRINGLIB_IS_UNICODE
/* Do not use it with Unicode. */
# error "transmogrify.h only compatible with byte-wise strings"
#endif
/* the more complicated methods. parts of these should be pulled out into the
/* the more complicated methods. parts of these should be pulled out into the
shared code in bytes_methods.c to cut down on duplicate code bloat. */
shared code in bytes_methods.c to cut down on duplicate code bloat. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment