[3.11] gh-107298: Fix numerous ref errors and typos in the C API docs (GH-108258) (#108290)

(cherry picked from commit d7202e4879)
This commit is contained in:
Serhiy Storchaka 2023-08-22 21:33:07 +03:00 committed by GitHub
parent 80c7ae00f1
commit 3ca9264aba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 101 additions and 92 deletions

View file

@ -211,17 +211,21 @@ For convenience, some of these functions will always return a
.. c:function:: PyObject* PyErr_SetFromWindowsErrWithFilename(int ierr, const char *filename)
Similar to :c:func:`PyErr_SetFromWindowsErrWithFilenameObject`, but the
filename is given as a C string. *filename* is decoded from the filesystem
encoding (:func:`os.fsdecode`).
Similar to :c:func:`PyErr_SetFromWindowsErr`, with the additional behavior
that if *filename* is not ``NULL``, it is decoded from the filesystem
encoding (:func:`os.fsdecode`) and passed to the constructor of
:exc:`OSError` as a third parameter to be used to define the
:attr:`!filename` attribute of the exception instance.
.. availability:: Windows.
.. c:function:: PyObject* PyErr_SetExcFromWindowsErrWithFilenameObject(PyObject *type, int ierr, PyObject *filename)
Similar to :c:func:`PyErr_SetFromWindowsErrWithFilenameObject`, with an
additional parameter specifying the exception type to be raised.
Similar to :c:func:`PyErr_SetExcFromWindowsErr`, with the additional behavior
that if *filename* is not ``NULL``, it is passed to the constructor of
:exc:`OSError` as a third parameter to be used to define the
:attr:`!filename` attribute of the exception instance.
.. availability:: Windows.