diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2019-10-30 10:03:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-30 10:03:20 (GMT) |
commit | 25fc088607c855060ed142296dc1bd0125fad1af (patch) | |
tree | 384af093a75c0d66a00da4b1d2b184e68de67211 /Doc/c-api/refcounting.rst | |
parent | da6ce58dd5ac109485af45878fca6bfd265b43e9 (diff) | |
download | cpython-25fc088607c855060ed142296dc1bd0125fad1af.zip cpython-25fc088607c855060ed142296dc1bd0125fad1af.tar.gz cpython-25fc088607c855060ed142296dc1bd0125fad1af.tar.bz2 |
bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950)
Replace all *NULL* with ``NULL``.
Diffstat (limited to 'Doc/c-api/refcounting.rst')
-rw-r--r-- | Doc/c-api/refcounting.rst | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Doc/c-api/refcounting.rst b/Doc/c-api/refcounting.rst index 6b07c87..0df12c6 100644 --- a/Doc/c-api/refcounting.rst +++ b/Doc/c-api/refcounting.rst @@ -13,22 +13,22 @@ objects. .. c:function:: void Py_INCREF(PyObject *o) - Increment the reference count for object *o*. The object must not be *NULL*; if - you aren't sure that it isn't *NULL*, use :c:func:`Py_XINCREF`. + Increment the reference count for object *o*. The object must not be ``NULL``; if + you aren't sure that it isn't ``NULL``, use :c:func:`Py_XINCREF`. .. c:function:: void Py_XINCREF(PyObject *o) - Increment the reference count for object *o*. The object may be *NULL*, in + Increment the reference count for object *o*. The object may be ``NULL``, in which case the macro has no effect. .. c:function:: void Py_DECREF(PyObject *o) - Decrement the reference count for object *o*. The object must not be *NULL*; if - you aren't sure that it isn't *NULL*, use :c:func:`Py_XDECREF`. If the reference + Decrement the reference count for object *o*. The object must not be ``NULL``; if + you aren't sure that it isn't ``NULL``, use :c:func:`Py_XDECREF`. If the reference count reaches zero, the object's type's deallocation function (which must not be - *NULL*) is invoked. + ``NULL``) is invoked. .. warning:: @@ -44,18 +44,18 @@ objects. .. c:function:: void Py_XDECREF(PyObject *o) - Decrement the reference count for object *o*. The object may be *NULL*, in + Decrement the reference count for object *o*. The object may be ``NULL``, in which case the macro has no effect; otherwise the effect is the same as for :c:func:`Py_DECREF`, and the same warning applies. .. c:function:: void Py_CLEAR(PyObject *o) - Decrement the reference count for object *o*. The object may be *NULL*, in + Decrement the reference count for object *o*. The object may be ``NULL``, in which case the macro has no effect; otherwise the effect is the same as for - :c:func:`Py_DECREF`, except that the argument is also set to *NULL*. The warning + :c:func:`Py_DECREF`, except that the argument is also set to ``NULL``. The warning for :c:func:`Py_DECREF` does not apply with respect to the object passed because - the macro carefully uses a temporary variable and sets the argument to *NULL* + the macro carefully uses a temporary variable and sets the argument to ``NULL`` before decrementing its reference count. It is a good idea to use this macro whenever decrementing the reference |