@@ -151,19 +151,35 @@ which disallows mutable objects such as :class:`bytearray`.
151
151
Previously, :exc: `TypeError ` was raised when embedded null code points
152
152
were encountered in the Python string.
153
153
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
+
154
158
``u# `` (:class: `str `) [Py_UNICODE \* , int]
155
159
This variant on ``u `` stores into two C variables, the first one a pointer to a
156
160
Unicode data buffer, the second one its length. This variant allows
157
161
null code points.
158
162
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
+
159
167
``Z `` (:class: `str ` or ``None ``) [Py_UNICODE \* ]
160
168
Like ``u ``, but the Python object may also be ``None ``, in which case the
161
169
:c:type: `Py_UNICODE ` pointer is set to *NULL *.
162
170
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
+
163
175
``Z# `` (:class: `str ` or ``None ``) [Py_UNICODE \* , int]
164
176
Like ``u# ``, but the Python object may also be ``None ``, in which case the
165
177
:c:type: `Py_UNICODE ` pointer is set to *NULL *.
166
178
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
+
167
183
``U `` (:class: `str `) [PyObject \* ]
168
184
Requires that the Python object is a Unicode object, without attempting
169
185
any conversion. Raises :exc: `TypeError ` if the object is not a Unicode
@@ -552,12 +568,13 @@ Building values
552
568
``z#`` (:class:`str` or ``None``) [char \*, int ]
553
569
Same as ``s#``.
554
570
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.
558
575
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
561
578
Unicode object. If the Unicode buffer pointer is *NULL*, the length is ignored
562
579
and ``None`` is returned.
563
580
0 commit comments