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
e7f90375
Commit
e7f90375
authored
Oct 05, 2012
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#16127: remove outdated references to narrow builds. Patch by Serhiy Storchaka.
parent
19294074
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
17 deletions
+6
-17
Doc/c-api/unicode.rst
Doc/c-api/unicode.rst
+0
-2
Doc/reference/lexical_analysis.rst
Doc/reference/lexical_analysis.rst
+1
-3
Include/unicodeobject.h
Include/unicodeobject.h
+1
-2
Objects/unicodeobject.c
Objects/unicodeobject.c
+4
-10
No files found.
Doc/c-api/unicode.rst
View file @
e7f90375
...
@@ -1083,8 +1083,6 @@ These are the UTF-32 codec APIs:
...
@@ -1083,8 +1083,6 @@ These are the UTF-32 codec APIs:
After completion, *\*byteorder* is set to the current byte order at the end
After completion, *\*byteorder* is set to the current byte order at the end
of input data.
of input data.
In a narrow build codepoints outside the BMP will be decoded as surrogate pairs.
If *byteorder* is *NULL*, the codec starts in native order mode.
If *byteorder* is *NULL*, the codec starts in native order mode.
Return *NULL* if an exception was raised by the codec.
Return *NULL* if an exception was raised by the codec.
...
...
Doc/reference/lexical_analysis.rst
View file @
e7f90375
...
@@ -538,9 +538,7 @@ Notes:
...
@@ -538,9 +538,7 @@ Notes:
this escape sequence. Exactly four hex digits are required.
this escape sequence. Exactly four hex digits are required.
(6)
(6)
Any Unicode character can be encoded this way, but characters outside the Basic
Any Unicode character can be encoded this way. Exactly eight hex digits
Multilingual Plane (BMP) will be encoded using a surrogate pair if Python is
compiled to use 16-bit code units (the default). Exactly eight hex digits
are required.
are required.
...
...
Include/unicodeobject.h
View file @
e7f90375
...
@@ -1022,8 +1022,7 @@ PyAPI_FUNC(void*) _PyUnicode_AsKind(PyObject *s, unsigned int kind);
...
@@ -1022,8 +1022,7 @@ PyAPI_FUNC(void*) _PyUnicode_AsKind(PyObject *s, unsigned int kind);
/* Create a Unicode Object from the given Unicode code point ordinal.
/* Create a Unicode Object from the given Unicode code point ordinal.
The ordinal must be in range(0x10000) on narrow Python builds
The ordinal must be in range(0x110000). A ValueError is
(UCS2), and range(0x110000) on wide builds (UCS4). A ValueError is
raised in case it is not.
raised in case it is not.
*/
*/
...
...
Objects/unicodeobject.c
View file @
e7f90375
...
@@ -5772,18 +5772,12 @@ PyUnicode_AsUnicodeEscapeString(PyObject *unicode)
...
@@ -5772,18 +5772,12 @@ PyUnicode_AsUnicodeEscapeString(PyObject *unicode)
void
*
data
;
void
*
data
;
Py_ssize_t
expandsize
=
0
;
Py_ssize_t
expandsize
=
0
;
/* Initial allocation is based on the longest-possible
unich
r
/* Initial allocation is based on the longest-possible
characte
r
escape.
escape.
In wide (UTF-32) builds '\U00xxxxxx' is 10 chars per source
For UCS1 strings it's '\xxx', 4 bytes per source character.
unichr, so in this case it's the longest unichr escape. In
For UCS2 strings it's '\uxxxx', 6 bytes per source character.
narrow (UTF-16) builds this is five chars per source unichr
For UCS4 strings it's '\U00xxxxxx', 10 bytes per source character.
since there are two unichrs in the surrogate pair, so in narrow
(UTF-16) builds it's not the longest unichr escape.
In wide or narrow builds '\uxxxx' is 6 chars per source unichr,
so in the narrow (UTF-16) build case it's the longest unichr
escape.
*/
*/
if
(
!
PyUnicode_Check
(
unicode
))
{
if
(
!
PyUnicode_Check
(
unicode
))
{
...
...
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