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
5c4a9d65
Commit
5c4a9d65
authored
Oct 19, 2005
by
Marc-André Lemburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Whitespace corrections.
parent
e115ec83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
Objects/unicodeobject.c
Objects/unicodeobject.c
+19
-19
No files found.
Objects/unicodeobject.c
View file @
5c4a9d65
...
...
@@ -850,7 +850,7 @@ char utf7_special[128] = {
#define SPECIAL(c, encodeO, encodeWS) \
((c) > 127 || (c) <= 0 || utf7_special[(c)] == 1 || \
(encodeWS && (utf7_special[(c)] == 2)) || \
(encodeWS && (utf7_special[(c)] == 2)) || \
(encodeO && (utf7_special[(c)] == 3)))
#define B64(n) \
...
...
@@ -861,29 +861,29 @@ char utf7_special[128] = {
((c) == '+' ? 62 : (c) == '/' ? 63 : (c) >= 'a' ? \
(c) - 71 : (c) >= 'A' ? (c) - 65 : (c) + 4 )
#define ENCODE(out, ch, bits) \
while (bits >= 6) { \
*out++ = B64(ch >> (bits-6)); \
bits -= 6; \
#define ENCODE(out, ch, bits)
\
while (bits >= 6) {
\
*out++ = B64(ch >> (bits-6));
\
bits -= 6;
\
}
#define DECODE(out, ch, bits, surrogate) \
while (bits >= 16) { \
Py_UNICODE outCh = (Py_UNICODE) ((ch >> (bits-16)) & 0xffff); \
bits -= 16; \
if (surrogate) {
\
#define DECODE(out, ch, bits, surrogate)
\
while (bits >= 16) {
\
Py_UNICODE outCh = (Py_UNICODE) ((ch >> (bits-16)) & 0xffff);
\
bits -= 16;
\
if (surrogate) {
\
/* We have already generated an error for the high surrogate \
so let's not bother seeing if the low surrogate is correct or not */
\
surrogate = 0;
\
} else if (0xDC00 <= outCh && outCh <= 0xDFFF) {
\
surrogate = 0;
\
} else if (0xDC00 <= outCh && outCh <= 0xDFFF) {
\
/* This is a surrogate pair. Unfortunately we can't represent \
it in a 16-bit character */
\
surrogate = 1;
\
errmsg = "code pairs are not supported"; \
goto utf7Error;
\
} else {
\
*out++ = outCh;
\
}
\
it in a 16-bit character */
\
surrogate = 1;
\
errmsg = "code pairs are not supported";
\
goto utf7Error;
\
} else {
\
*out++ = outCh;
\
}
\
}
PyObject
*
PyUnicode_DecodeUTF7
(
const
char
*
s
,
...
...
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