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
3cc3452e
Commit
3cc3452e
authored
May 04, 2007
by
Walter Dörwald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change PyUnicode_EncodeUTF16() so that it returns
bytes objects instead of str8 objects.
parent
bf58bd6d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Objects/unicodeobject.c
Objects/unicodeobject.c
+2
-2
No files found.
Objects/unicodeobject.c
View file @
3cc3452e
...
...
@@ -1726,12 +1726,12 @@ PyUnicode_EncodeUTF16(const Py_UNICODE *s,
if
(
s
[
i
]
>=
0x10000
)
pairs
++
;
#endif
v
=
Py
String
_FromStringAndSize
(
NULL
,
v
=
Py
Bytes
_FromStringAndSize
(
NULL
,
2
*
(
size
+
pairs
+
(
byteorder
==
0
)));
if
(
v
==
NULL
)
return
NULL
;
p
=
(
unsigned
char
*
)
Py
String
_AS_STRING
(
v
);
p
=
(
unsigned
char
*
)
Py
Bytes
_AS_STRING
(
v
);
if
(
byteorder
==
0
)
STORECHAR
(
0xFEFF
);
if
(
size
==
0
)
...
...
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