diff options
author | Victor Stinner <vstinner@python.org> | 2020-08-13 20:11:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-13 20:11:50 (GMT) |
commit | 474652fe9346382dbf793f20b671eb74668bebde (patch) | |
tree | e090a5b591783461601032795851e8b32d7f63e9 /Doc/c-api/dict.rst | |
parent | 0eb9deb4a62e6d9daa82bc2f67d1075864ca8ece (diff) | |
download | cpython-474652fe9346382dbf793f20b671eb74668bebde.zip cpython-474652fe9346382dbf793f20b671eb74668bebde.tar.gz cpython-474652fe9346382dbf793f20b671eb74668bebde.tar.bz2 |
bpo-40204, doc: Fix syntax of C variables (GH-21846)
For example, fix the following Sphinx 3 errors:
Doc/c-api/buffer.rst:102: WARNING: Error in declarator or parameters
Invalid C declaration: Expected identifier in nested name. [error at 5]
void \*obj
-----^
Doc/c-api/arg.rst:130: WARNING: Unparseable C cross-reference: 'PyObject*'
Invalid C declaration: Expected end of definition. [error at 8]
PyObject*
--------^
The modified documentation is compatible with Sphinx 2 and Sphinx 3.
Diffstat (limited to 'Doc/c-api/dict.rst')
-rw-r--r-- | Doc/c-api/dict.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/c-api/dict.rst b/Doc/c-api/dict.rst index 7493837..7694841 100644 --- a/Doc/c-api/dict.rst +++ b/Doc/c-api/dict.rst @@ -73,7 +73,7 @@ Dictionary Objects .. index:: single: PyUnicode_FromString() Insert *val* into the dictionary *p* using *key* as a key. *key* should - be a :c:type:`const char\*`. The key object is created using + be a :c:type:`const char*`. The key object is created using ``PyUnicode_FromString(key)``. Return ``0`` on success or ``-1`` on failure. This function *does not* steal a reference to *val*. @@ -116,7 +116,7 @@ Dictionary Objects .. c:function:: PyObject* PyDict_GetItemString(PyObject *p, const char *key) This is the same as :c:func:`PyDict_GetItem`, but *key* is specified as a - :c:type:`const char\*`, rather than a :c:type:`PyObject\*`. + :c:type:`const char*`, rather than a :c:type:`PyObject*`. Note that exceptions which occur while calling :meth:`__hash__` and :meth:`__eq__` methods and creating a temporary string object @@ -165,7 +165,7 @@ Dictionary Objects prior to the first call to this function to start the iteration; the function returns true for each pair in the dictionary, and false once all pairs have been reported. The parameters *pkey* and *pvalue* should either - point to :c:type:`PyObject\*` variables that will be filled in with each key + point to :c:type:`PyObject*` variables that will be filled in with each key and value, respectively, or may be ``NULL``. Any references returned through them are borrowed. *ppos* should not be altered during iteration. Its value represents offsets within the internal dictionary structure, and |