cpython: 055174308822 (original) (raw)
Mercurial > cpython
changeset 72699:055174308822
Document requierements of Unicode kinds
Victor Stinner victor.stinner@haypocalc.com | |
---|---|
date | Wed, 05 Oct 2011 01:31:05 +0200 |
parents | 5564bcb0035e |
children | 5f11621a6f51 |
files | Include/unicodeobject.h |
diffstat | 1 files changed, 20 insertions(+), 4 deletions(-)[+] [-] Include/unicodeobject.h 24 |
line wrap: on
line diff
--- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -288,10 +288,26 @@ typedef struct { unsigned int interned:2; /* Character size:
PyUnicode_WCHAR_KIND (0): wchar_t*[](#l1.7)
PyUnicode_1BYTE_KIND (1): Py_UCS1*[](#l1.8)
PyUnicode_2BYTE_KIND (2): Py_UCS2*[](#l1.9)
PyUnicode_4BYTE_KIND (3): Py_UCS4*[](#l1.10)
- PyUnicode_WCHAR_KIND (0):[](#l1.11)
* character type = wchar_t (16 or 32 bits, depending on the[](#l1.13)
platform)[](#l1.14)
- PyUnicode_1BYTE_KIND (1):[](#l1.16)
* character type = Py_UCS1 (8 bits, unsigned)[](#l1.18)
* if ascii is 1, at least one character must be in range[](#l1.19)
U+80-U+FF, otherwise all characters must be in range U+00-U+7F[](#l1.20)
- PyUnicode_2BYTE_KIND (2):[](#l1.22)
* character type = Py_UCS2 (16 bits, unsigned)[](#l1.24)
* at least one character must be in range U+0100-U+1FFFF[](#l1.25)
- PyUnicode_4BYTE_KIND (3):[](#l1.27)
* character type = Py_UCS4 (32 bits, unsigned)[](#l1.29)
* at least one character must be in range U+10000-U+10FFFF[](#l1.30) */[](#l1.31) unsigned int kind:2;[](#l1.32) /* Compact is with respect to the allocation scheme. Compact unicode[](#l1.33)