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
df4f6e9f
Commit
df4f6e9f
authored
Oct 10, 2005
by
Marc-André Lemburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify the docs for Py_UNICODE.
parent
007f8dfd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
Doc/api/concrete.tex
Doc/api/concrete.tex
+16
-6
No files found.
Doc/api/concrete.tex
View file @
df4f6e9f
...
...
@@ -787,14 +787,24 @@ These are the basic Unicode object types used for the Unicode
implementation in Python:
\begin{ctypedesc}
{
Py
_
UNICODE
}
This type represents a 16-bit unsigned storage type which is used by
Python internally as basis for holding Unicode ordinals. On
platforms where
\ctype
{
wchar
_
t
}
is available and also has 16-bits,
\ctype
{
Py
_
UNICODE
}
is a typedef alias for
\ctype
{
wchar
_
t
}
to enhance
native platform compatibility. On all other platforms,
\ctype
{
Py
_
UNICODE
}
is a typedef alias for
\ctype
{
unsigned short
}
.
This type represents the storage type which is used by Python
internally as basis for holding Unicode ordinals. Python's default
builds use a 16-bit type for
\ctype
{
Py
_
UNICODE
}
and store Unicode
values internally as UCS2. It is also possible to build a UCS4
version of Python (most recent Linux distributions come with UCS4
builds of Python). These builds then use a 32-bit type for
\ctype
{
Py
_
UNICODE
}
and store Unicode data internally as UCS4. On
platforms where
\ctype
{
wchar
_
t
}
is available and compatible with the
chosen Python Unicode build variant,
\ctype
{
Py
_
UNICODE
}
is a typedef
alias for
\ctype
{
wchar
_
t
}
to enhance native platform compatibility.
On all other platforms,
\ctype
{
Py
_
UNICODE
}
is a typedef alias for
either
\ctype
{
unsigned short
}
(UCS2) or
\ctype
{
unsigned long
}
(UCS4).
\end{ctypedesc}
Note that UCS2 and UCS4 Python builds are not binary compatible.
Please keep this in mind when writing extensions or interfaces.
\begin{ctypedesc}
{
PyUnicodeObject
}
This subtype of
\ctype
{
PyObject
}
represents a Python Unicode object.
\end{ctypedesc}
...
...
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