]> granicus.if.org Git - python/commitdiff
Fix documented signatures for C API functions. (GH-11236)
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 19 Dec 2018 13:31:40 +0000 (15:31 +0200)
committerGitHub <noreply@github.com>
Wed, 19 Dec 2018 13:31:40 +0000 (15:31 +0200)
Doc/c-api/tuple.rst
Doc/c-api/unicode.rst

index a66832cfa4349280dd8a633978858d5b90243906..20bf9f0b0804cdd4ca96723c726d2f9f2cc2e7f9 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 92e22b16a4ef2992db976ae06a006574b35c01d3..39c067d439cc6446ccf0f004c6de3de1e2ffa376 100644 (file)
@@ -935,7 +935,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
@@ -1346,7 +1346,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.
@@ -1515,8 +1515,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