diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2019-10-30 21:37:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-30 21:37:16 +0200 |
| commit | e835b31d2b212c3c7820364398979cae2a9740b2 (patch) | |
| tree | b4480396678dc575c8f183f0e5add28ee7f36604 /Doc/library | |
| parent | 1d8da61f5ad26274556e0bbce260ce292d0402a1 (diff) | |
| download | cpython-git-e835b31d2b212c3c7820364398979cae2a9740b2.tar.gz | |
bpo-38600: NULL -> ``NULL``. (GH-17001)
Also fix some other formatting.
Diffstat (limited to 'Doc/library')
| -rw-r--r-- | Doc/library/ctypes.rst | 6 | ||||
| -rw-r--r-- | Doc/library/gc.rst | 2 | ||||
| -rwxr-xr-x | Doc/library/socket.rst | 6 | ||||
| -rw-r--r-- | Doc/library/winreg.rst | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst index 4504a800c4..1f84b7ab29 100644 --- a/Doc/library/ctypes.rst +++ b/Doc/library/ctypes.rst @@ -152,8 +152,8 @@ the ``time()`` function, which returns system time in seconds since the Unix epoch, and the ``GetModuleHandleA()`` function, which returns a win32 module handle. -This example calls both functions with a NULL pointer (``None`` should be used -as the NULL pointer):: +This example calls both functions with a ``NULL`` pointer (``None`` should be used +as the ``NULL`` pointer):: >>> print(libc.time(None)) # doctest: +SKIP 1150640792 @@ -1110,7 +1110,7 @@ Since ``table`` is a ``pointer`` to the array of ``struct_frozen`` records, we can iterate over it, but we just have to make sure that our loop terminates, because pointers have no size. Sooner or later it would probably crash with an access violation or whatever, so it's better to break out of the loop when we -hit the NULL entry:: +hit the ``NULL`` entry:: >>> for item in table: ... if item.name is None: diff --git a/Doc/library/gc.rst b/Doc/library/gc.rst index 084cd6ac25..366861c524 100644 --- a/Doc/library/gc.rst +++ b/Doc/library/gc.rst @@ -212,7 +212,7 @@ values but should not rebind them): A list of objects which the collector found to be unreachable but could not be freed (uncollectable objects). Starting with Python 3.4, this list should be empty most of the time, except when using instances of - C extension types with a non-NULL ``tp_del`` slot. + C extension types with a non-``NULL`` ``tp_del`` slot. If :const:`DEBUG_SAVEALL` is set, then all unreachable objects will be added to this list rather than freed. diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index d443e972fe..62552bcbe2 100755 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -1675,9 +1675,9 @@ to sockets. ``None`` or a :term:`bytes-like object` representing a buffer. In the later case it is up to the caller to ensure that the bytestring contains the proper bits (see the optional built-in module :mod:`struct` for a way to - encode C structures as bytestrings). When value is set to ``None``, - optlen argument is required. It's equivalent to call setsockopt C - function with optval=NULL and optlen=optlen. + encode C structures as bytestrings). When *value* is set to ``None``, + *optlen* argument is required. It's equivalent to call :c:func:`setsockopt` C + function with ``optval=NULL`` and ``optlen=optlen``. .. versionchanged:: 3.5 diff --git a/Doc/library/winreg.rst b/Doc/library/winreg.rst index cb67f2f39d..5e810680b2 100644 --- a/Doc/library/winreg.rst +++ b/Doc/library/winreg.rst @@ -343,7 +343,7 @@ This module offers the following functions: value set by the :func:`SetValue` method for the key identified by *key*. Values in the registry have name, type, and data components. This method - retrieves the data for a key's first value that has a NULL name. But the + retrieves the data for a key's first value that has a ``NULL`` name. But the underlying API call doesn't return the type, so always use :func:`QueryValueEx` if possible. @@ -391,7 +391,7 @@ This module offers the following functions: <https://msdn.microsoft.com/en-us/library/ms724878%28v=VS.85%29.aspx>`__ for more details. - This function passes NULL for *security_attributes* to the API. + This function passes ``NULL`` for *security_attributes* to the API. .. function:: SetValue(key, sub_key, type, value) |
