Skip to content

Commit e2e6f90

Browse files
Fix documented signatures for C API functions. (GH-11236)
(cherry picked from commit 57dd79e) Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent a11d440 commit e2e6f90

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Doc/c-api/tuple.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ type.
209209
This function "steals" a reference to *o*.
210210
211211
212-
.. c:function:: PyObject* PyStructSequence_SET_ITEM(PyObject *p, Py_ssize_t *pos, PyObject *o)
212+
.. c:function:: void PyStructSequence_SET_ITEM(PyObject *p, Py_ssize_t *pos, PyObject *o)
213213
214214
Macro equivalent of :c:func:`PyStructSequence_SetItem`.
215215

Doc/c-api/unicode.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ wchar_t Support
935935
Return *NULL* on failure.
936936
937937
938-
.. c:function:: Py_ssize_t PyUnicode_AsWideChar(PyUnicodeObject *unicode, wchar_t *w, Py_ssize_t size)
938+
.. c:function:: Py_ssize_t PyUnicode_AsWideChar(PyObject *unicode, wchar_t *w, Py_ssize_t size)
939939
940940
Copy the Unicode object contents into the :c:type:`wchar_t` buffer *w*. At most
941941
*size* :c:type:`wchar_t` characters are copied (excluding a possibly trailing
@@ -1346,7 +1346,7 @@ These are the "Raw Unicode Escape" codec APIs:
13461346
13471347
13481348
.. c:function:: PyObject* PyUnicode_EncodeRawUnicodeEscape(const Py_UNICODE *s, \
1349-
Py_ssize_t size, const char *errors)
1349+
Py_ssize_t size)
13501350
13511351
Encode the :c:type:`Py_UNICODE` buffer of the given *size* using Raw-Unicode-Escape
13521352
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.
15151515
Return *NULL* if an exception was raised by the codec.
15161516
15171517
1518-
.. c:function:: PyObject* PyUnicode_DecodeMBCSStateful(const char *s, int size, \
1519-
const char *errors, int *consumed)
1518+
.. c:function:: PyObject* PyUnicode_DecodeMBCSStateful(const char *s, Py_ssize_t size, \
1519+
const char *errors, Py_ssize_t *consumed)
15201520
15211521
If *consumed* is *NULL*, behave like :c:func:`PyUnicode_DecodeMBCS`. If
15221522
*consumed* is not *NULL*, :c:func:`PyUnicode_DecodeMBCSStateful` will not decode

0 commit comments

Comments
 (0)