diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2012-08-05 22:46:05 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2012-08-05 22:46:05 (GMT) |
commit | 62bb394729a167a46d950954c4aed5f3ba7b8a69 (patch) | |
tree | 734100e548a373ceaed15000bc94cd2fed6c82c6 /Doc/library/array.rst | |
parent | 3af26174016fc5547a36fba37cacfaeaac9a9b6e (diff) | |
download | cpython-62bb394729a167a46d950954c4aed5f3ba7b8a69.zip cpython-62bb394729a167a46d950954c4aed5f3ba7b8a69.tar.gz cpython-62bb394729a167a46d950954c4aed5f3ba7b8a69.tar.bz2 |
Close #13072: Restore code before the PEP 393 for the array module
'u' format of the array module uses again Py_UNICODE type for backward
compatibility with Python 3.2.
The only change from Python 3.2 is that PyUnicode_AsUnicode() result is now
checked for NULL value.
Diffstat (limited to 'Doc/library/array.rst')
-rw-r--r-- | Doc/library/array.rst | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Doc/library/array.rst b/Doc/library/array.rst index 3e275a2..2eb926c 100644 --- a/Doc/library/array.rst +++ b/Doc/library/array.rst @@ -21,7 +21,7 @@ defined: +-----------+--------------------+-------------------+-----------------------+-------+ | ``'B'`` | unsigned char | int | 1 | | +-----------+--------------------+-------------------+-----------------------+-------+ -| ``'u'`` | Py_UCS4 | Unicode character | 4 | | +| ``'u'`` | Py_UNICODE | Unicode character | 2 | \(1) | +-----------+--------------------+-------------------+-----------------------+-------+ | ``'h'`` | signed short | int | 2 | | +-----------+--------------------+-------------------+-----------------------+-------+ @@ -35,9 +35,9 @@ defined: +-----------+--------------------+-------------------+-----------------------+-------+ | ``'L'`` | unsigned long | int | 4 | | +-----------+--------------------+-------------------+-----------------------+-------+ -| ``'q'`` | signed long long | int | 8 | \(1) | +| ``'q'`` | signed long long | int | 8 | \(2) | +-----------+--------------------+-------------------+-----------------------+-------+ -| ``'Q'`` | unsigned long long | int | 8 | \(1) | +| ``'Q'`` | unsigned long long | int | 8 | \(2) | +-----------+--------------------+-------------------+-----------------------+-------+ | ``'f'`` | float | float | 4 | | +-----------+--------------------+-------------------+-----------------------+-------+ @@ -47,6 +47,11 @@ defined: Notes: (1) + The ``'u'`` type code corresponds to Python's unicode character + (:c:type:`Py_UNICODE` which is :c:type:`wchar_t`). Depending on the + platform, it can be 16 bits or 32 bits. + +(2) The ``'q'`` and ``'Q'`` type codes are available only if the platform C compiler used to build Python supports C :c:type:`long long`, or, on Windows, :c:type:`__int64`. |