diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-10-05 15:20:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-05 15:20:03 (GMT) |
commit | d5852a090fc5bfdc99e8d8f5e1e890cac8102d4e (patch) | |
tree | 64eecc5ec88f7a432aa4937161811b0aa8d5965e /Doc/library/socket.rst | |
parent | ffafd31975a3322dd47aa8583e99e7c654785657 (diff) | |
download | cpython-d5852a090fc5bfdc99e8d8f5e1e890cac8102d4e.zip cpython-d5852a090fc5bfdc99e8d8f5e1e890cac8102d4e.tar.gz cpython-d5852a090fc5bfdc99e8d8f5e1e890cac8102d4e.tar.bz2 |
[3.11] gh-93738: Documentation C syntax (Use `c:struct`) (GH-97772) (#97869)
Use `c:struct`
(cherry picked from commit a0f5599aac2037da715d09733e0a83a9cba7c37a)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Diffstat (limited to 'Doc/library/socket.rst')
-rw-r--r-- | Doc/library/socket.rst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index 9d1cfb5..71d2c50 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -1012,7 +1012,7 @@ The :mod:`socket` module also offers various network-related services: Convert an IPv4 address from dotted-quad string format (for example, '123.45.67.89') to 32-bit packed binary format, as a bytes object four characters in length. This is useful when conversing with a program that uses the standard C - library and needs objects of type :c:type:`struct in_addr`, which is the C type + library and needs objects of type :c:struct:`in_addr`, which is the C type for the 32-bit packed binary this function returns. :func:`inet_aton` also accepts strings with less than three dots; see the @@ -1031,7 +1031,7 @@ The :mod:`socket` module also offers various network-related services: Convert a 32-bit packed IPv4 address (a :term:`bytes-like object` four bytes in length) to its standard dotted-quad string representation (for example, '123.45.67.89'). This is useful when conversing with a program that uses the - standard C library and needs objects of type :c:type:`struct in_addr`, which + standard C library and needs objects of type :c:struct:`in_addr`, which is the C type for the 32-bit packed binary data this function takes as an argument. @@ -1048,8 +1048,8 @@ The :mod:`socket` module also offers various network-related services: Convert an IP address from its family-specific string format to a packed, binary format. :func:`inet_pton` is useful when a library or network protocol - calls for an object of type :c:type:`struct in_addr` (similar to - :func:`inet_aton`) or :c:type:`struct in6_addr`. + calls for an object of type :c:struct:`in_addr` (similar to + :func:`inet_aton`) or :c:struct:`in6_addr`. Supported values for *address_family* are currently :const:`AF_INET` and :const:`AF_INET6`. If the IP address string *ip_string* is invalid, @@ -1069,8 +1069,8 @@ The :mod:`socket` module also offers various network-related services: bytes) to its standard, family-specific string representation (for example, ``'7.10.0.5'`` or ``'5aef:2b::8'``). :func:`inet_ntop` is useful when a library or network protocol returns an - object of type :c:type:`struct in_addr` (similar to :func:`inet_ntoa`) or - :c:type:`struct in6_addr`. + object of type :c:struct:`in_addr` (similar to :func:`inet_ntoa`) or + :c:struct:`in6_addr`. Supported values for *address_family* are currently :const:`AF_INET` and :const:`AF_INET6`. If the bytes object *packed_ip* is not the correct |