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
bafa6a42
Commit
bafa6a42
authored
Oct 01, 2011
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PyUnicode_CHARACTER_SIZE(): add a reference to PyUnicode_KIND_SIZE()
parent
afac54c5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Include/unicodeobject.h
Include/unicodeobject.h
+5
-2
No files found.
Include/unicodeobject.h
View file @
bafa6a42
...
...
@@ -338,7 +338,9 @@ PyAPI_DATA(PyTypeObject) PyUnicodeIter_Type;
/* Return the number of bytes the string uses to represent single characters,
this can be 1, 2 or 4. */
this can be 1, 2 or 4.
See also PyUnicode_KIND_SIZE(). */
#define PyUnicode_CHARACTER_SIZE(op) \
(1 << (PyUnicode_KIND(op) - 1))
...
...
@@ -378,8 +380,9 @@ PyAPI_DATA(PyTypeObject) PyUnicodeIter_Type;
_PyUnicode_NONCOMPACT_DATA(op))
/* Compute (index * char_size) where char_size is 2 ** (kind - 1).
The index is a character index, the result is a size in bytes.
The index is a character index, the result is a size in bytes
. */
See also PyUnicode_CHARACTER_SIZE()
. */
#define PyUnicode_KIND_SIZE(kind, index) ((index) << ((kind) - 1))
/* In the access macros below, "kind" may be evaluated more than once.
...
...
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