diff options
author | Cheryl Sabella <cheryl.sabella@gmail.com> | 2018-10-12 14:55:20 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2018-10-12 14:55:20 (GMT) |
commit | 2d6097d027e0dd3debbabc702aa9c98d94ba32a3 (patch) | |
tree | 283b237b7e8da5afa68b5d79792d61f8d60596ac /Doc/c-api | |
parent | da2bf9f66d0c95b988c5d87646d168f65499b316 (diff) | |
download | cpython-2d6097d027e0dd3debbabc702aa9c98d94ba32a3.zip cpython-2d6097d027e0dd3debbabc702aa9c98d94ba32a3.tar.gz cpython-2d6097d027e0dd3debbabc702aa9c98d94ba32a3.tar.bz2 |
bpo-11233: Create availability directive for documentation (GH-9692)
Replace "Availability: xxx" with ".. availability:: xxx" in the doc.
Original patch by Georg Brandl.
Co-Authored-By: Georg Brandl <georg@python.org>
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/exceptions.rst | 22 | ||||
-rw-r--r-- | Doc/c-api/init.rst | 4 |
2 files changed, 18 insertions, 8 deletions
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst index 2bc1bd8..dd1e026 100644 --- a/Doc/c-api/exceptions.rst +++ b/Doc/c-api/exceptions.rst @@ -186,34 +186,42 @@ NULL pointer for use in a ``return`` statement. then it constructs a tuple object whose first item is the *ierr* value and whose second item is the corresponding error message (gotten from :c:func:`FormatMessage`), and then calls ``PyErr_SetObject(PyExc_WindowsError, - object)``. This function always returns *NULL*. Availability: Windows. + object)``. This function always returns *NULL*. + + .. availability:: Windows. .. c:function:: PyObject* PyErr_SetExcFromWindowsErr(PyObject *type, int ierr) Similar to :c:func:`PyErr_SetFromWindowsErr`, with an additional parameter - specifying the exception type to be raised. Availability: Windows. + specifying the exception type to be raised. + + .. availability:: Windows. .. 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`). Availability: Windows. + encoding (:func:`os.fsdecode`). + + .. 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. - Availability: Windows. + + .. availability:: Windows. .. c:function:: PyObject* PyErr_SetExcFromWindowsErrWithFilenameObjects(PyObject *type, int ierr, PyObject *filename, PyObject *filename2) Similar to :c:func:`PyErr_SetExcFromWindowsErrWithFilenameObject`, but accepts a second filename object. - Availability: Windows. + + .. availability:: Windows. .. versionadded:: 3.4 @@ -221,7 +229,9 @@ NULL pointer for use in a ``return`` statement. .. c:function:: PyObject* PyErr_SetExcFromWindowsErrWithFilename(PyObject *type, int ierr, const char *filename) Similar to :c:func:`PyErr_SetFromWindowsErrWithFilename`, with an additional - parameter specifying the exception type to be raised. Availability: Windows. + parameter specifying the exception type to be raised. + + .. availability:: Windows. .. c:function:: PyObject* PyErr_SetImportError(PyObject *msg, PyObject *name, PyObject *path) diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index e51a255..6b5290a 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -156,7 +156,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2. See :pep:`529` for more details. - Availability: Windows. + .. availability:: Windows. .. c:var:: Py_LegacyWindowsStdioFlag @@ -168,7 +168,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2. See :pep:`528` for more details. - Availability: Windows. + .. availability:: Windows. .. c:var:: Py_NoSiteFlag |