summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-10-01 00:39:37 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-10-01 00:39:37 (GMT)
commit4584a5ba1ab223d273b1678ba6ec3a2781a824f7 (patch)
tree62dd59954872b3171c3c915af6defaaced5cbef5 /Include
parente9a2935c1fa124ea7fdc6009908b90bab9232371 (diff)
downloadcpython-4584a5ba1ab223d273b1678ba6ec3a2781a824f7.zip
cpython-4584a5ba1ab223d273b1678ba6ec3a2781a824f7.tar.gz
cpython-4584a5ba1ab223d273b1678ba6ec3a2781a824f7.tar.bz2
PyUnicode_CHARACTER_SIZE(): add a reference to PyUnicode_KIND_SIZE()
Diffstat (limited to 'Include')
-rw-r--r--Include/unicodeobject.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
index 9f3f66d..c41d787 100644
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -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.