Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 951b6c3

Browse filesBrowse files
[3.7] bpo-38600: NULL -> NULL. (GH-17001) (GH-17004)
Also fix some other formatting. (cherry picked from commit e835b31)
1 parent 7f7f986 commit 951b6c3
Copy full SHA for 951b6c3

23 files changed

+60-60Lines changed: 60 additions & 60 deletions
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Doc/c-api/arg.rst‎

Copy file name to clipboardExpand all lines: Doc/c-api/arg.rst
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ Other objects
345345
If the *converter* returns ``Py_CLEANUP_SUPPORTED``, it may get called a
346346
second time if the argument parsing eventually fails, giving the converter a
347347
chance to release any memory that it had already allocated. In this second
348-
call, the *object* parameter will be NULL; *address* will have the same value
348+
call, the *object* parameter will be ``NULL``; *address* will have the same value
349349
as in the original call.
350350

351351
.. versionchanged:: 3.1
Collapse file

‎Doc/c-api/buffer.rst‎

Copy file name to clipboardExpand all lines: Doc/c-api/buffer.rst
+4-4Lines changed: 4 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ a buffer, see :c:func:`PyObject_GetBuffer`.
130130
.. c:member:: Py_ssize_t itemsize
131131
132132
Item size in bytes of a single element. Same as the value of :func:`struct.calcsize`
133-
called on non-NULL :c:member:`~Py_buffer.format` values.
133+
called on non-``NULL`` :c:member:`~Py_buffer.format` values.
134134

135135
Important exception: If a consumer requests a buffer without the
136136
:c:macro:`PyBUF_FORMAT` flag, :c:member:`~Py_buffer.format` will
@@ -199,7 +199,7 @@ a buffer, see :c:func:`PyObject_GetBuffer`.
199199
memory block).
200200

201201
If all suboffsets are negative (i.e. no de-referencing is needed), then
202-
this field must be NULL (the default value).
202+
this field must be ``NULL`` (the default value).
203203

204204
This type of array representation is used by the Python Imaging Library
205205
(PIL). See `complex arrays`_ for further information how to access elements
@@ -407,7 +407,7 @@ to two ``char x[2][3]`` arrays that can be located anywhere in memory.
407407

408408

409409
Here is a function that returns a pointer to the element in an N-D array
410-
pointed to by an N-dimensional index when there are both non-NULL strides
410+
pointed to by an N-dimensional index when there are both non-``NULL`` strides
411411
and suboffsets::
412412

413413
void *get_item_pointer(int ndim, void *buf, Py_ssize_t *strides,
@@ -520,4 +520,4 @@ Buffer-related functions
520520
521521
If this function is used as part of a :ref:`getbufferproc <buffer-structs>`,
522522
*exporter* MUST be set to the exporting object and *flags* must be passed
523-
unmodified. Otherwise, *exporter* MUST be NULL.
523+
unmodified. Otherwise, *exporter* MUST be ``NULL``.
Collapse file

‎Doc/c-api/conversion.rst‎

Copy file name to clipboardExpand all lines: Doc/c-api/conversion.rst
+8-8Lines changed: 8 additions & 8 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ NULL``.
3232
3333
If the platform doesn't have :c:func:`vsnprintf` and the buffer size needed to
3434
avoid truncation exceeds *size* by more than 512 bytes, Python aborts with a
35-
*Py_FatalError*.
35+
:c:func:`Py_FatalError`.
3636
3737
The return value (*rv*) for these functions should be interpreted as follows:
3838
@@ -95,21 +95,21 @@ The following functions provide locale-independent string to number conversions.
9595
must be 0 and is ignored. The ``'r'`` format code specifies the
9696
standard :func:`repr` format.
9797
98-
*flags* can be zero or more of the values *Py_DTSF_SIGN*,
99-
*Py_DTSF_ADD_DOT_0*, or *Py_DTSF_ALT*, or-ed together:
98+
*flags* can be zero or more of the values ``Py_DTSF_SIGN``,
99+
``Py_DTSF_ADD_DOT_0``, or ``Py_DTSF_ALT``, or-ed together:
100100
101-
* *Py_DTSF_SIGN* means to always precede the returned string with a sign
101+
* ``Py_DTSF_SIGN`` means to always precede the returned string with a sign
102102
character, even if *val* is non-negative.
103103
104-
* *Py_DTSF_ADD_DOT_0* means to ensure that the returned string will not look
104+
* ``Py_DTSF_ADD_DOT_0`` means to ensure that the returned string will not look
105105
like an integer.
106106
107-
* *Py_DTSF_ALT* means to apply "alternate" formatting rules. See the
107+
* ``Py_DTSF_ALT`` means to apply "alternate" formatting rules. See the
108108
documentation for the :c:func:`PyOS_snprintf` ``'#'`` specifier for
109109
details.
110110
111-
If *ptype* is non-NULL, then the value it points to will be set to one of
112-
*Py_DTST_FINITE*, *Py_DTST_INFINITE*, or *Py_DTST_NAN*, signifying that
111+
If *ptype* is non-``NULL``, then the value it points to will be set to one of
112+
``Py_DTST_FINITE``, ``Py_DTST_INFINITE``, or ``Py_DTST_NAN``, signifying that
113113
*val* is a finite number, an infinite number, or not a number, respectively.
114114
115115
The return value is a pointer to *buffer* with the converted string or
Collapse file

‎Doc/c-api/coro.rst‎

Copy file name to clipboardExpand all lines: Doc/c-api/coro.rst
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ return.
2323

2424
.. c:function:: int PyCoro_CheckExact(PyObject *ob)
2525
26-
Return true if *ob*'s type is *PyCoro_Type*; *ob* must not be ``NULL``.
26+
Return true if *ob*'s type is :c:type:`PyCoro_Type`; *ob* must not be ``NULL``.
2727
2828
2929
.. c:function:: PyObject* PyCoro_New(PyFrameObject *frame, PyObject *name, PyObject *qualname)
Collapse file

‎Doc/c-api/exceptions.rst‎

Copy file name to clipboardExpand all lines: Doc/c-api/exceptions.rst
+4-4Lines changed: 4 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ return ``1`` for success and ``0`` for failure).
1919

2020
Concretely, the error indicator consists of three object pointers: the
2121
exception's type, the exception's value, and the traceback object. Any
22-
of those pointers can be NULL if non-set (although some combinations are
23-
forbidden, for example you can't have a non-NULL traceback if the exception
24-
type is NULL).
22+
of those pointers can be ``NULL`` if non-set (although some combinations are
23+
forbidden, for example you can't have a non-``NULL`` traceback if the exception
24+
type is ``NULL``).
2525

2626
When a function must fail because some function it called failed, it generally
2727
doesn't set the error indicator; the function it called already set it. It is
@@ -89,7 +89,7 @@ Raising exceptions
8989
9090
These functions help you set the current thread's error indicator.
9191
For convenience, some of these functions will always return a
92-
NULL pointer for use in a ``return`` statement.
92+
``NULL`` pointer for use in a ``return`` statement.
9393
9494
9595
.. c:function:: void PyErr_SetString(PyObject *type, const char *message)
Collapse file

‎Doc/c-api/function.rst‎

Copy file name to clipboardExpand all lines: Doc/c-api/function.rst
+5-5Lines changed: 5 additions & 5 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ There are a few functions specific to Python functions.
4242
.. c:function:: PyObject* PyFunction_NewWithQualName(PyObject *code, PyObject *globals, PyObject *qualname)
4343
4444
As :c:func:`PyFunction_New`, but also allows setting the function object's
45-
``__qualname__`` attribute. *qualname* should be a unicode object or NULL;
46-
if NULL, the ``__qualname__`` attribute is set to the same value as its
45+
``__qualname__`` attribute. *qualname* should be a unicode object or ``NULL``;
46+
if ``NULL``, the ``__qualname__`` attribute is set to the same value as its
4747
``__name__`` attribute.
4848
4949
.. versionadded:: 3.3
@@ -75,7 +75,7 @@ There are a few functions specific to Python functions.
7575
.. c:function:: int PyFunction_SetDefaults(PyObject *op, PyObject *defaults)
7676
7777
Set the argument default values for the function object *op*. *defaults* must be
78-
*Py_None* or a tuple.
78+
``Py_None`` or a tuple.
7979
8080
Raises :exc:`SystemError` and returns ``-1`` on failure.
8181
@@ -89,7 +89,7 @@ There are a few functions specific to Python functions.
8989
.. c:function:: int PyFunction_SetClosure(PyObject *op, PyObject *closure)
9090
9191
Set the closure associated with the function object *op*. *closure* must be
92-
*Py_None* or a tuple of cell objects.
92+
``Py_None`` or a tuple of cell objects.
9393
9494
Raises :exc:`SystemError` and returns ``-1`` on failure.
9595
@@ -103,6 +103,6 @@ There are a few functions specific to Python functions.
103103
.. c:function:: int PyFunction_SetAnnotations(PyObject *op, PyObject *annotations)
104104
105105
Set the annotations for the function object *op*. *annotations*
106-
must be a dictionary or *Py_None*.
106+
must be a dictionary or ``Py_None``.
107107
108108
Raises :exc:`SystemError` and returns ``-1`` on failure.
Collapse file

‎Doc/c-api/gen.rst‎

Copy file name to clipboardExpand all lines: Doc/c-api/gen.rst
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ than explicitly calling :c:func:`PyGen_New` or :c:func:`PyGen_NewWithQualName`.
2727
2828
.. c:function:: int PyGen_CheckExact(PyObject *ob)
2929
30-
Return true if *ob*'s type is *PyGen_Type*; *ob* must not be ``NULL``.
30+
Return true if *ob*'s type is :c:type:`PyGen_Type`; *ob* must not be ``NULL``.
3131
3232
3333
.. c:function:: PyObject* PyGen_New(PyFrameObject *frame)
Collapse file

‎Doc/c-api/import.rst‎

Copy file name to clipboardExpand all lines: Doc/c-api/import.rst
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ Importing Modules
207207
.. c:function:: PyObject* PyImport_GetModule(PyObject *name)
208208
209209
Return the already imported module with the given name. If the
210-
module has not been imported yet then returns NULL but does not set
211-
an error. Returns NULL and sets an error if the lookup failed.
210+
module has not been imported yet then returns ``NULL`` but does not set
211+
an error. Returns ``NULL`` and sets an error if the lookup failed.
212212
213213
.. versionadded:: 3.7
214214
Collapse file

‎Doc/c-api/init.rst‎

Copy file name to clipboardExpand all lines: Doc/c-api/init.rst
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ Process-wide parameters
326326
It overrides :envvar:`PYTHONIOENCODING` values, and allows embedding code
327327
to control IO encoding when the environment variable does not work.
328328
329-
``encoding`` and/or ``errors`` may be NULL to use
329+
*encoding* and/or *errors* may be ``NULL`` to use
330330
:envvar:`PYTHONIOENCODING` and/or default values (depending on other
331331
settings).
332332
Collapse file

‎Doc/c-api/marshal.rst‎

Copy file name to clipboardExpand all lines: Doc/c-api/marshal.rst
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Numeric values are stored with the least significant byte first.
1616
The module supports two versions of the data format: version 0 is the
1717
historical version, version 1 shares interned strings in the file, and upon
1818
unmarshalling. Version 2 uses a binary format for floating point numbers.
19-
*Py_MARSHAL_VERSION* indicates the current file format (currently 2).
19+
``Py_MARSHAL_VERSION`` indicates the current file format (currently 2).
2020

2121

2222
.. c:function:: void PyMarshal_WriteLongToFile(long value, FILE *file, int version)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.