bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950)
Replace all *NULL* with ``NULL``.
diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst
index b0a1938..1035277 100644
--- a/Doc/c-api/structures.rst
+++ b/Doc/c-api/structures.rst
@@ -113,8 +113,8 @@
Type of the functions used to implement most Python callables in C.
Functions of this type take two :c:type:`PyObject\*` parameters and return
- one such value. If the return value is *NULL*, an exception shall have
- been set. If not *NULL*, the return value is interpreted as the return
+ one such value. If the return value is ``NULL``, an exception shall have
+ been set. If not ``NULL``, the return value is interpreted as the return
value of the function as exposed in Python. The function must return a new
reference.
@@ -186,7 +186,7 @@
Methods with these flags must be of type :c:type:`PyCFunctionWithKeywords`.
The function expects three parameters: *self*, *args*, *kwargs* where
- *kwargs* is a dictionary of all the keyword arguments or possibly *NULL*
+ *kwargs* is a dictionary of all the keyword arguments or possibly ``NULL``
if there are no keyword arguments. The parameters are typically processed
using :c:func:`PyArg_ParseTupleAndKeywords`.
@@ -212,7 +212,7 @@
there is an additional fourth :c:type:`PyObject\*` parameter
which is a tuple representing the names of the keyword arguments
(which are guaranteed to be strings)
- or possibly *NULL* if there are no keywords. The values of the keyword
+ or possibly ``NULL`` if there are no keywords. The values of the keyword
arguments are stored in the *args* array, after the positional arguments.
This is not part of the :ref:`limited API <stable>`.
@@ -226,7 +226,7 @@
they are listed with the :const:`METH_NOARGS` flag. They need to be of type
:c:type:`PyCFunction`. The first parameter is typically named *self* and will
hold a reference to the module or object instance. In all cases the second
- parameter will be *NULL*.
+ parameter will be ``NULL``.
.. data:: METH_O
@@ -257,7 +257,7 @@
.. index:: builtin: staticmethod
- The method will be passed *NULL* as the first parameter rather than an
+ The method will be passed ``NULL`` as the first parameter rather than an
instance of the type. This is used to create *static methods*, similar to
what is created when using the :func:`staticmethod` built-in function.
@@ -334,7 +334,7 @@
=============== ==================
:c:macro:`T_OBJECT` and :c:macro:`T_OBJECT_EX` differ in that
- :c:macro:`T_OBJECT` returns ``None`` if the member is *NULL* and
+ :c:macro:`T_OBJECT` returns ``None`` if the member is ``NULL`` and
:c:macro:`T_OBJECT_EX` raises an :exc:`AttributeError`. Try to use
:c:macro:`T_OBJECT_EX` over :c:macro:`T_OBJECT` because :c:macro:`T_OBJECT_EX`
handles use of the :keyword:`del` statement on that attribute more correctly
@@ -344,7 +344,7 @@
read-only access. Using :c:macro:`T_STRING` for :attr:`type` implies
:c:macro:`READONLY`. :c:macro:`T_STRING` data is interpreted as UTF-8.
Only :c:macro:`T_OBJECT` and :c:macro:`T_OBJECT_EX`
- members can be deleted. (They are set to *NULL*).
+ members can be deleted. (They are set to ``NULL``).
.. _pymemberdef-offsets:
@@ -388,7 +388,7 @@
typedef PyObject *(*getter)(PyObject *, void *);
- It should return a new reference on success or *NULL* with a set exception
+ It should return a new reference on success or ``NULL`` with a set exception
on failure.
``set`` functions take two :c:type:`PyObject\*` parameters (the instance and
@@ -396,5 +396,5 @@
typedef int (*setter)(PyObject *, PyObject *, void *);
- In case the attribute should be deleted the second parameter is *NULL*.
+ In case the attribute should be deleted the second parameter is ``NULL``.
Should return ``0`` on success or ``-1`` with a set exception on failure.