@@ -151,19 +151,35 @@ which disallows mutable objects such as :class:`bytearray`.
151151 Previously, :exc: `TypeError ` was raised when embedded null code points
152152 were encountered in the Python string.
153153
154+ .. deprecated-removed :: 3.3 4.0
155+ Part of the old-style :c:type: `Py_UNICODE ` API; please migrate to using
156+ :c:func: `PyUnicode_AsWideCharString `.
157+
154158``u# `` (:class: `str `) [Py_UNICODE \* , int]
155159 This variant on ``u `` stores into two C variables, the first one a pointer to a
156160 Unicode data buffer, the second one its length. This variant allows
157161 null code points.
158162
163+ .. deprecated-removed :: 3.3 4.0
164+ Part of the old-style :c:type: `Py_UNICODE ` API; please migrate to using
165+ :c:func: `PyUnicode_AsWideCharString `.
166+
159167``Z `` (:class: `str ` or ``None ``) [Py_UNICODE \* ]
160168 Like ``u ``, but the Python object may also be ``None ``, in which case the
161169 :c:type: `Py_UNICODE ` pointer is set to *NULL *.
162170
171+ .. deprecated-removed :: 3.3 4.0
172+ Part of the old-style :c:type: `Py_UNICODE ` API; please migrate to using
173+ :c:func: `PyUnicode_AsWideCharString `.
174+
163175``Z# `` (:class: `str ` or ``None ``) [Py_UNICODE \* , int]
164176 Like ``u# ``, but the Python object may also be ``None ``, in which case the
165177 :c:type: `Py_UNICODE ` pointer is set to *NULL *.
166178
179+ .. deprecated-removed :: 3.3 4.0
180+ Part of the old-style :c:type: `Py_UNICODE ` API; please migrate to using
181+ :c:func: `PyUnicode_AsWideCharString `.
182+
167183``U `` (:class: `str `) [PyObject \* ]
168184 Requires that the Python object is a Unicode object, without attempting
169185 any conversion. Raises :exc: `TypeError ` if the object is not a Unicode
@@ -552,12 +568,13 @@ Building values
552568 ``z#`` (:class:`str` or ``None``) [char \*, int ]
553569 Same as ``s#``.
554570
555- ``u `` (:class: `str `) [Py_UNICODE \*]
556- Convert a null-terminated buffer of Unicode (UCS-2 or UCS-4) data to a Python
557- Unicode object. If the Unicode buffer pointer is *NULL*, ``None`` is returned.
571+ ``u `` (:class: `str `) [wchar_t \*]
572+ Convert a null-terminated :c:type:`wchar_t` buffer of Unicode (UTF-16 or UCS-4)
573+ data to a Python Unicode object. If the Unicode buffer pointer is *NULL*,
574+ ``None`` is returned.
558575
559- ``u#`` (:class:`str`) [Py_UNICODE \*, int ]
560- Convert a Unicode (UCS-2 or UCS-4) data buffer and its length to a Python
576+ ``u#`` (:class:`str`) [wchar_t \*, int ]
577+ Convert a Unicode (UTF-16 or UCS-4) data buffer and its length to a Python
561578 Unicode object. If the Unicode buffer pointer is *NULL*, the length is ignored
562579 and ``None`` is returned.
563580
0 commit comments