summaryrefslogtreecommitdiff
path: root/Doc/c-api/unicode.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-01-25 13:27:44 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2017-01-25 13:27:44 +0200
commit19b1c3b04e2b01bd3b35b9e14c1735959d3b65e8 (patch)
tree24ab2ab26f886e3da21f91979512412360abea5d /Doc/c-api/unicode.rst
parent3f19a274c28567afb39ba46ea8a2ebdeab816b0b (diff)
parent82e2d87e841850bc39db8ae954321986761492f5 (diff)
downloadcpython-19b1c3b04e2b01bd3b35b9e14c1735959d3b65e8.tar.gz
Issue #27867: Function PySlice_GetIndicesEx() is deprecated and replaced with
a macro if Py_LIMITED_API is not set or set to the value between 0x03050400 and 0x03060000 (not including) or 0x03060100 or higher. Added functions PySlice_Unpack() and PySlice_AdjustIndices().
Diffstat (limited to 'Doc/c-api/unicode.rst')
-rw-r--r--Doc/c-api/unicode.rst13
1 files changed, 11 insertions, 2 deletions
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index 02f7ada7be..bcae44ef49 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -1038,7 +1038,7 @@ These are the UTF-8 codec APIs:
raised by the codec.
-.. c:function:: char* PyUnicode_AsUTF8AndSize(PyObject *unicode, Py_ssize_t *size)
+.. c:function:: const char* PyUnicode_AsUTF8AndSize(PyObject *unicode, Py_ssize_t *size)
Return a pointer to the UTF-8 encoding of the Unicode object, and
store the size of the encoded representation (in bytes) in *size*. The
@@ -1055,13 +1055,19 @@ These are the UTF-8 codec APIs:
.. versionadded:: 3.3
+ .. versionchanged:: 3.7
+ The return type is now ``const char *`` rather of ``char *``.
-.. c:function:: char* PyUnicode_AsUTF8(PyObject *unicode)
+
+.. c:function:: const char* PyUnicode_AsUTF8(PyObject *unicode)
As :c:func:`PyUnicode_AsUTF8AndSize`, but does not store the size.
.. versionadded:: 3.3
+ .. versionchanged:: 3.7
+ The return type is now ``const char *`` rather of ``char *``.
+
.. c:function:: PyObject* PyUnicode_EncodeUTF8(const Py_UNICODE *s, Py_ssize_t size, const char *errors)
@@ -1605,6 +1611,9 @@ They all return *NULL* or ``-1`` if an exception occurs.
.. versionadded:: 3.3
+ .. versionchanged:: 3.7
+ *start* and *end* are now adjusted to behave like ``str[start:end]``.
+
.. c:function:: Py_ssize_t PyUnicode_Count(PyObject *str, PyObject *substr, \
Py_ssize_t start, Py_ssize_t end)