]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix documented signatures for C API functions. (GH-11236) (GH-11240)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 20 Dec 2018 21:34:21 +0000 (13:34 -0800)
committerNed Deily <nad@python.org>
Thu, 20 Dec 2018 21:34:21 +0000 (16:34 -0500)
(cherry picked from commit 57dd79e6f7f33bb4e6817ac58c9cb91de99675e0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Doc/c-api/tuple.rst
Doc/c-api/unicode.rst

index 3922d50f80a2d217bc00f066e753bf413ef341d9..ab8ee9abf4c46a367afad86d3b8b6949baabebe0 100644 (file)
@@ -209,7 +209,7 @@ type.
       This function "steals" a reference to *o*.
 
 
-.. c:function:: PyObject* PyStructSequence_SET_ITEM(PyObject *p, Py_ssize_t *pos, PyObject *o)
+.. c:function:: void PyStructSequence_SET_ITEM(PyObject *p, Py_ssize_t *pos, PyObject *o)
 
    Macro equivalent of :c:func:`PyStructSequence_SetItem`.
 
index b9acaec949b252e78b94759e440009265b2eb79a..55d5b070ff3abbd7bca7c17d71bed3a63936257b 100644 (file)
@@ -925,7 +925,7 @@ wchar_t Support
    Return *NULL* on failure.
 
 
-.. c:function:: Py_ssize_t PyUnicode_AsWideChar(PyUnicodeObject *unicode, wchar_t *w, Py_ssize_t size)
+.. c:function:: Py_ssize_t PyUnicode_AsWideChar(PyObject *unicode, wchar_t *w, Py_ssize_t size)
 
    Copy the Unicode object contents into the :c:type:`wchar_t` buffer *w*.  At most
    *size* :c:type:`wchar_t` characters are copied (excluding a possibly trailing
@@ -1324,7 +1324,7 @@ These are the "Raw Unicode Escape" codec APIs:
 
 
 .. c:function:: PyObject* PyUnicode_EncodeRawUnicodeEscape(const Py_UNICODE *s, \
-                              Py_ssize_t size, const char *errors)
+                              Py_ssize_t size)
 
    Encode the :c:type:`Py_UNICODE` buffer of the given *size* using Raw-Unicode-Escape
    and return a bytes object.  Return *NULL* if an exception was raised by the codec.
@@ -1493,8 +1493,8 @@ the user settings on the machine running the codec.
    Return *NULL* if an exception was raised by the codec.
 
 
-.. c:function:: PyObject* PyUnicode_DecodeMBCSStateful(const char *s, int size, \
-                              const char *errors, int *consumed)
+.. c:function:: PyObject* PyUnicode_DecodeMBCSStateful(const char *s, Py_ssize_t size, \
+                              const char *errors, Py_ssize_t *consumed)
 
    If *consumed* is *NULL*, behave like :c:func:`PyUnicode_DecodeMBCS`. If
    *consumed* is not *NULL*, :c:func:`PyUnicode_DecodeMBCSStateful` will not decode