On success, return ``0``.
On error, set an exception, leave the writer unchanged, and return ``-1``.
- .. versionadded:: next
+ .. versionadded:: 3.14
.. c:function:: int PyUnicodeWriter_WriteWideChar(PyUnicodeWriter *writer, const wchar_t *str, Py_ssize_t size)
functions as replacements for :c:func:`PySys_GetObject`.
(Contributed by Serhiy Storchaka in :gh:`108512`.)
-* Add :c:func:`PyUnicodeWriter_WriteASCII` function to write an ASCII string
- into a :c:type:`PyUnicodeWriter`. The function is faster than
- :c:func:`PyUnicodeWriter_WriteUTF8`, but has an undefined behavior if the
- input string contains non-ASCII characters.
- (Contributed by Victor Stinner in :gh:`133968`.)
-
* Add :c:type:`PyUnstable_Unicode_GET_CACHED_HASH` to get the cached hash of
a string. See the documentation for caveats.
(Contributed by Petr Viktorin in :gh:`131510`)