summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/unicode.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-11-20 15:20:19 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-11-20 15:20:19 (GMT)
commitcf36835fc5ccdd42ec8ec22bd773b0e450754588 (patch)
tree3942586930a249be92fd99c240c8ac602434f902 /Doc/c-api/unicode.rst
parent6770f8a4877eba56dd9978caf197795dbc3d3ffb (diff)
downloadcpython-cf36835fc5ccdd42ec8ec22bd773b0e450754588.zip
cpython-cf36835fc5ccdd42ec8ec22bd773b0e450754588.tar.gz
cpython-cf36835fc5ccdd42ec8ec22bd773b0e450754588.tar.bz2
Issue #28750: Fixed docs of of unicode-escape an raw-unicode-escape C API.
Patch by Xiang Zhang.
Diffstat (limited to 'Doc/c-api/unicode.rst')
-rw-r--r--Doc/c-api/unicode.rst12
1 files changed, 5 insertions, 7 deletions
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index 1813d99..acdef7d 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -1291,16 +1291,15 @@ These are the "Unicode Escape" codec APIs:
.. c:function:: PyObject* PyUnicode_AsUnicodeEscapeString(PyObject *unicode)
- Encode a Unicode object using Unicode-Escape and return the result as Python
- string object. Error handling is "strict". Return *NULL* if an exception was
+ Encode a Unicode object using Unicode-Escape and return the result as a
+ bytes object. Error handling is "strict". Return *NULL* if an exception was
raised by the codec.
.. c:function:: PyObject* PyUnicode_EncodeUnicodeEscape(const Py_UNICODE *s, Py_ssize_t size)
Encode the :c:type:`Py_UNICODE` buffer of the given *size* using Unicode-Escape and
- return a Python string object. Return *NULL* if an exception was raised by the
- codec.
+ return a bytes object. Return *NULL* if an exception was raised by the codec.
.. deprecated-removed:: 3.3 4.0
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using
@@ -1323,7 +1322,7 @@ These are the "Raw Unicode Escape" codec APIs:
.. c:function:: PyObject* PyUnicode_AsRawUnicodeEscapeString(PyObject *unicode)
Encode a Unicode object using Raw-Unicode-Escape and return the result as
- Python string object. Error handling is "strict". Return *NULL* if an exception
+ a bytes object. Error handling is "strict". Return *NULL* if an exception
was raised by the codec.
@@ -1331,8 +1330,7 @@ These are the "Raw Unicode Escape" codec APIs:
Py_ssize_t size, const char *errors)
Encode the :c:type:`Py_UNICODE` buffer of the given *size* using Raw-Unicode-Escape
- and return a Python string object. Return *NULL* if an exception was raised by
- the codec.
+ and return a bytes object. Return *NULL* if an exception was raised by the codec.
.. deprecated-removed:: 3.3 4.0
Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using