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
40574831
Commit
40574831
authored
Apr 06, 2004
by
Hye-Shik Chang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SF Patch #926375: Remove a useless UTF-16 support code that is never
been used. (Suggested by Martin v. Loewis)
parent
8a5c3c76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
18 deletions
+3
-18
Objects/unicodeobject.c
Objects/unicodeobject.c
+3
-18
No files found.
Objects/unicodeobject.c
View file @
40574831
...
...
@@ -405,7 +405,7 @@ int PyUnicode_AsWideChar(PyUnicodeObject *unicode,
PyObject
*
PyUnicode_FromOrdinal
(
int
ordinal
)
{
Py_UNICODE
s
[
2
];
Py_UNICODE
s
[
1
];
#ifdef Py_UNICODE_WIDE
if
(
ordinal
<
0
||
ordinal
>
0x10ffff
)
{
...
...
@@ -423,23 +423,8 @@ PyObject *PyUnicode_FromOrdinal(int ordinal)
}
#endif
if
(
ordinal
<=
0xffff
)
{
/* UCS-2 character */
s
[
0
]
=
(
Py_UNICODE
)
ordinal
;
return
PyUnicode_FromUnicode
(
s
,
1
);
}
else
{
#ifndef Py_UNICODE_WIDE
/* UCS-4 character. store as two surrogate characters */
ordinal
-=
0x10000L
;
s
[
0
]
=
0xD800
+
(
Py_UNICODE
)
(
ordinal
>>
10
);
s
[
1
]
=
0xDC00
+
(
Py_UNICODE
)
(
ordinal
&
0x03FF
);
return
PyUnicode_FromUnicode
(
s
,
2
);
#else
s
[
0
]
=
(
Py_UNICODE
)
ordinal
;
return
PyUnicode_FromUnicode
(
s
,
1
);
#endif
}
s
[
0
]
=
(
Py_UNICODE
)
ordinal
;
return
PyUnicode_FromUnicode
(
s
,
1
);
}
PyObject
*
PyUnicode_FromObject
(
register
PyObject
*
obj
)
...
...
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