summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/array.rst2
-rw-r--r--Doc/library/asynchat.rst2
-rw-r--r--Doc/library/asyncore.rst12
-rw-r--r--Doc/library/codecs.rst4
-rw-r--r--Doc/library/ctypes.rst182
-rw-r--r--Doc/library/datetime.rst14
-rw-r--r--Doc/library/exceptions.rst12
-rw-r--r--Doc/library/fcntl.rst10
-rw-r--r--Doc/library/getopt.rst10
-rw-r--r--Doc/library/inspect.rst4
-rw-r--r--Doc/library/locale.rst4
-rw-r--r--Doc/library/mailbox.rst8
-rw-r--r--Doc/library/msilib.rst38
-rw-r--r--Doc/library/msvcrt.rst2
-rw-r--r--Doc/library/multiprocessing.rst2
-rw-r--r--Doc/library/os.rst40
-rw-r--r--Doc/library/ossaudiodev.rst2
-rw-r--r--Doc/library/platform.rst6
-rw-r--r--Doc/library/posix.rst8
-rw-r--r--Doc/library/re.rst10
-rw-r--r--Doc/library/select.rst24
-rw-r--r--Doc/library/signal.rst4
-rw-r--r--Doc/library/socket.rst24
-rw-r--r--Doc/library/stat.rst6
-rw-r--r--Doc/library/stdtypes.rst4
-rw-r--r--Doc/library/struct.rst88
-rw-r--r--Doc/library/subprocess.rst4
-rw-r--r--Doc/library/sys.rst10
-rw-r--r--Doc/library/time.rst6
-rw-r--r--Doc/library/warnings.rst2
-rw-r--r--Doc/library/winsound.rst4
-rw-r--r--Doc/library/zlib.rst2
32 files changed, 275 insertions, 275 deletions
diff --git a/Doc/library/array.rst b/Doc/library/array.rst
index e4975c8..40655a5 100644
--- a/Doc/library/array.rst
+++ b/Doc/library/array.rst
@@ -103,7 +103,7 @@ The following data items and methods are also supported:
memory buffer in bytes can be computed as ``array.buffer_info()[1] *
array.itemsize``. This is occasionally useful when working with low-level (and
inherently unsafe) I/O interfaces that require memory addresses, such as certain
- :cfunc:`ioctl` operations. The returned numbers are valid as long as the array
+ :c:func:`ioctl` operations. The returned numbers are valid as long as the array
exists and no length-changing operations are applied to it.
.. note::
diff --git a/Doc/library/asynchat.rst b/Doc/library/asynchat.rst
index 3b8eb12..26d3290 100644
--- a/Doc/library/asynchat.rst
+++ b/Doc/library/asynchat.rst
@@ -31,7 +31,7 @@ connection requests.
Like :class:`asyncore.dispatcher`, :class:`async_chat` defines a set of
events that are generated by an analysis of socket conditions after a
- :cfunc:`select` call. Once the polling loop has been started the
+ :c:func:`select` call. Once the polling loop has been started the
:class:`async_chat` object's methods are called by the event-processing
framework with no action on the part of the programmer.
diff --git a/Doc/library/asyncore.rst b/Doc/library/asyncore.rst
index cdfdb7a..8e6c243 100644
--- a/Doc/library/asyncore.rst
+++ b/Doc/library/asyncore.rst
@@ -22,7 +22,7 @@ bound. If your program is processor bound, then pre-emptive scheduled threads
are probably what you really need. Network servers are rarely processor
bound, however.
-If your operating system supports the :cfunc:`select` system call in its I/O
+If your operating system supports the :c:func:`select` system call in its I/O
library (and nearly all do), then you can use it to juggle multiple
communication channels at once; doing other work while your I/O is taking
place in the "background." Although this strategy can seem strange and
@@ -92,8 +92,8 @@ any that have been added to the map during asynchronous service) is closed.
During asynchronous processing, each mapped channel's :meth:`readable` and
:meth:`writable` methods are used to determine whether the channel's socket
- should be added to the list of channels :cfunc:`select`\ ed or
- :cfunc:`poll`\ ed for read and write events.
+ should be added to the list of channels :c:func:`select`\ ed or
+ :c:func:`poll`\ ed for read and write events.
Thus, the set of channel events is larger than the basic socket events. The
full set of methods that can be overridden in your subclass follows:
@@ -250,9 +250,9 @@ any that have been added to the map during asynchronous service) is closed.
.. class:: file_dispatcher()
A file_dispatcher takes a file descriptor or :term:`file object` along
- with an optional map argument and wraps it for use with the :cfunc:`poll`
- or :cfunc:`loop` functions. If provided a file object or anything with a
- :cfunc:`fileno` method, that method will be called and passed to the
+ with an optional map argument and wraps it for use with the :c:func:`poll`
+ or :c:func:`loop` functions. If provided a file object or anything with a
+ :c:func:`fileno` method, that method will be called and passed to the
:class:`file_wrapper` constructor. Availability: UNIX.
.. class:: file_wrapper()
diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst
index e734fee..1971136 100644
--- a/Doc/library/codecs.rst
+++ b/Doc/library/codecs.rst
@@ -787,9 +787,9 @@ Encodings and Unicode
---------------------
Strings are stored internally as sequences of codepoints (to be precise
-as :ctype:`Py_UNICODE` arrays). Depending on the way Python is compiled (either
+as :c:type:`Py_UNICODE` arrays). Depending on the way Python is compiled (either
via :option:`--without-wide-unicode` or :option:`--with-wide-unicode`, with the
-former being the default) :ctype:`Py_UNICODE` is either a 16-bit or 32-bit data
+former being the default) :c:type:`Py_UNICODE` is either a 16-bit or 32-bit data
type. Once a string object is used outside of CPU and memory, CPU endianness
and how these arrays are stored as bytes become an issue. Transforming a
string object into a sequence of bytes is called encoding and recreating the
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
index 32499d5..a8977f8 100644
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -38,7 +38,7 @@ You load libraries by accessing them as attributes of these objects. *cdll*
loads libraries which export functions using the standard ``cdecl`` calling
convention, while *windll* libraries call functions using the ``stdcall``
calling convention. *oledll* also uses the ``stdcall`` calling convention, and
-assumes the functions return a Windows :ctype:`HRESULT` error code. The error
+assumes the functions return a Windows :c:type:`HRESULT` error code. The error
code is used to automatically raise a :class:`WindowsError` exception when the
function call fails.
@@ -198,9 +198,9 @@ should be careful anyway.
``None``, integers, bytes objects and (unicode) strings are the only native
Python objects that can directly be used as parameters in these function calls.
``None`` is passed as a C ``NULL`` pointer, bytes objects and strings are passed
-as pointer to the memory block that contains their data (:ctype:`char *` or
-:ctype:`wchar_t *`). Python integers are passed as the platforms default C
-:ctype:`int` type, their value is masked to fit into the C type.
+as pointer to the memory block that contains their data (:c:type:`char *` or
+:c:type:`wchar_t *`). Python integers are passed as the platforms default C
+:c:type:`int` type, their value is masked to fit into the C type.
Before we move on calling functions with other parameter types, we have to learn
more about :mod:`ctypes` data types.
@@ -213,46 +213,46 @@ Fundamental data types
:mod:`ctypes` defines a number of primitive C compatible data types :
-+----------------------+----------------------------------------+----------------------------+
-| ctypes type | C type | Python type |
-+======================+========================================+============================+
-| :class:`c_char` | :ctype:`char` | 1-character bytes object |
-+----------------------+----------------------------------------+----------------------------+
-| :class:`c_wchar` | :ctype:`wchar_t` | 1-character string |
-+----------------------+----------------------------------------+----------------------------+
-| :class:`c_byte` | :ctype:`char` | int |
-+----------------------+----------------------------------------+----------------------------+
-| :class:`c_ubyte` | :ctype:`unsigned char` | int |
-+----------------------+----------------------------------------+----------------------------+
-| :class:`c_short` | :ctype:`short` | int |
-+----------------------+----------------------------------------+----------------------------+
-| :class:`c_ushort` | :ctype:`unsigned short` | int |
-+----------------------+----------------------------------------+----------------------------+
-| :class:`c_int` | :ctype:`int` | int |
-+----------------------+----------------------------------------+----------------------------+
-| :class:`c_uint` | :ctype:`unsigned int` | int |
-+----------------------+----------------------------------------+----------------------------+
-| :class:`c_long` | :ctype:`long` | int |
-+----------------------+----------------------------------------+----------------------------+
-| :class:`c_ulong` | :ctype:`unsigned long` | int |
-+----------------------+----------------------------------------+----------------------------+
-| :class:`c_longlong` | :ctype:`__int64` or :ctype:`long long` | int |
-+----------------------+----------------------------------------+----------------------------+
-| :class:`c_ulonglong` | :ctype:`unsigned __int64` or | int |
-| | :ctype:`unsigned long long` | |
-+----------------------+----------------------------------------+----------------------------+
-| :class:`c_float` | :ctype:`float` | float |
-+----------------------+----------------------------------------+----------------------------+
-| :class:`c_double` | :ctype:`double` | float |
-+----------------------+----------------------------------------+----------------------------+
-| :class:`c_longdouble`| :ctype:`long double` | float |
-+----------------------+----------------------------------------+----------------------------+
-| :class:`c_char_p` | :ctype:`char *` (NUL terminated) | bytes object or ``None`` |
-+----------------------+----------------------------------------+----------------------------+
-| :class:`c_wchar_p` | :ctype:`wchar_t *` (NUL terminated) | string or ``None`` |
-+----------------------+----------------------------------------+----------------------------+
-| :class:`c_void_p` | :ctype:`void *` | int or ``None`` |
-+----------------------+----------------------------------------+----------------------------+
++----------------------+------------------------------------------+----------------------------+
+| ctypes type | C type | Python type |
++======================+==========================================+============================+
+| :class:`c_char` | :c:type:`char` | 1-character bytes object |
++----------------------+------------------------------------------+----------------------------+
+| :class:`c_wchar` | :c:type:`wchar_t` | 1-character string |
++----------------------+------------------------------------------+----------------------------+
+| :class:`c_byte` | :c:type:`char` | int |
++----------------------+------------------------------------------+----------------------------+
+| :class:`c_ubyte` | :c:type:`unsigned char` | int |
++----------------------+------------------------------------------+----------------------------+
+| :class:`c_short` | :c:type:`short` | int |
++----------------------+------------------------------------------+----------------------------+
+| :class:`c_ushort` | :c:type:`unsigned short` | int |
++----------------------+------------------------------------------+----------------------------+
+| :class:`c_int` | :c:type:`int` | int |
++----------------------+------------------------------------------+----------------------------+
+| :class:`c_uint` | :c:type:`unsigned int` | int |
++----------------------+------------------------------------------+----------------------------+
+| :class:`c_long` | :c:type:`long` | int |
++----------------------+------------------------------------------+----------------------------+
+| :class:`c_ulong` | :c:type:`unsigned long` | int |
++----------------------+------------------------------------------+----------------------------+
+| :class:`c_longlong` | :c:type:`__int64` or :c:type:`long long` | int |
++----------------------+------------------------------------------+----------------------------+
+| :class:`c_ulonglong` | :c:type:`unsigned __int64` or | int |
+| | :c:type:`unsigned long long` | |
++----------------------+------------------------------------------+----------------------------+
+| :class:`c_float` | :c:type:`float` | float |
++----------------------+------------------------------------------+----------------------------+
+| :class:`c_double` | :c:type:`double` | float |
++----------------------+------------------------------------------+----------------------------+
+| :class:`c_longdouble`| :c:type:`long double` | float |
++----------------------+------------------------------------------+----------------------------+
+| :class:`c_char_p` | :c:type:`char *` (NUL terminated) | bytes object or ``None`` |
++----------------------+------------------------------------------+----------------------------+
+| :class:`c_wchar_p` | :c:type:`wchar_t *` (NUL terminated) | string or ``None`` |
++----------------------+------------------------------------------+----------------------------+
+| :class:`c_void_p` | :c:type:`void *` | int or ``None`` |
++----------------------+------------------------------------------+----------------------------+
All these types can be created by calling them with an optional initializer of
the correct type and value::
@@ -320,7 +320,7 @@ property::
The :func:`create_string_buffer` function replaces the :func:`c_buffer` function
(which is still available as an alias), as well as the :func:`c_string` function
from earlier ctypes releases. To create a mutable memory block containing
-unicode characters of the C type :ctype:`wchar_t` use the
+unicode characters of the C type :c:type:`wchar_t` use the
:func:`create_unicode_buffer` function.
@@ -431,7 +431,7 @@ integer, string, bytes, a :mod:`ctypes` instance, or an object with an
Return types
^^^^^^^^^^^^
-By default functions are assumed to return the C :ctype:`int` type. Other
+By default functions are assumed to return the C :c:type:`int` type. Other
return types can be specified by setting the :attr:`restype` attribute of the
function object.
@@ -930,8 +930,8 @@ argument, and the callback functions expected argument types as the remaining
arguments.
I will present an example here which uses the standard C library's
-:cfunc:`qsort` function, this is used to sort items with the help of a callback
-function. :cfunc:`qsort` will be used to sort an array of integers::
+:c:func:`qsort` function, this is used to sort items with the help of a callback
+function. :c:func:`qsort` will be used to sort an array of integers::
>>> IntArray5 = c_int * 5
>>> ia = IntArray5(5, 1, 7, 33, 99)
@@ -1072,7 +1072,7 @@ Accessing values exported from dlls
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Some shared libraries not only export functions, they also export variables. An
-example in the Python library itself is the :cdata:`Py_OptimizeFlag`, an integer
+example in the Python library itself is the :c:data:`Py_OptimizeFlag`, an integer
set to 0, 1, or 2, depending on the :option:`-O` or :option:`-OO` flag given on
startup.
@@ -1090,11 +1090,11 @@ have printed ``c_long(1)``, or ``c_long(2)`` if :option:`-OO` would have been
specified.
An extended example which also demonstrates the use of pointers accesses the
-:cdata:`PyImport_FrozenModules` pointer exported by Python.
+:c:data:`PyImport_FrozenModules` pointer exported by Python.
Quoting the docs for that value:
- This pointer is initialized to point to an array of :ctype:`struct _frozen`
+ This pointer is initialized to point to an array of :c:type:`struct _frozen`
records, terminated by one whose members are all *NULL* or zero. When a frozen
module is imported, it is searched in this table. Third-party code could play
tricks with this to provide a dynamically created collection of frozen modules.
@@ -1111,7 +1111,7 @@ size, we show only how this table can be read with :mod:`ctypes`::
...
>>>
-We have defined the :ctype:`struct _frozen` data type, so we can get the pointer
+We have defined the :c:type:`struct _frozen` data type, so we can get the pointer
to the table::
>>> FrozenTable = POINTER(struct_frozen)
@@ -1330,7 +1330,7 @@ way is to instantiate one of the following classes:
Instances of this class represent loaded shared libraries. Functions in these
libraries use the standard C calling convention, and are assumed to return
- :ctype:`int`.
+ :c:type:`int`.
.. class:: OleDLL(name, mode=DEFAULT_MODE, handle=None, use_errno=False, use_last_error=False)
@@ -1347,7 +1347,7 @@ way is to instantiate one of the following classes:
Windows only: Instances of this class represent loaded shared libraries,
functions in these libraries use the ``stdcall`` calling convention, and are
- assumed to return :ctype:`int` by default.
+ assumed to return :c:type:`int` by default.
On Windows CE only the standard calling convention is used, for convenience the
:class:`WinDLL` and :class:`OleDLL` use the standard calling convention on this
@@ -1488,7 +1488,7 @@ object is available:
An instance of :class:`PyDLL` that exposes Python C API functions as
attributes. Note that all these functions are assumed to return C
- :ctype:`int`, which is of course not always the truth, so you have to assign
+ :c:type:`int`, which is of course not always the truth, so you have to assign
the correct :attr:`restype` attribute to use these functions.
@@ -1517,10 +1517,10 @@ They are instances of a private class:
.. attribute:: restype
Assign a ctypes type to specify the result type of the foreign function.
- Use ``None`` for :ctype:`void`, a function not returning anything.
+ Use ``None`` for :c:type:`void`, a function not returning anything.
It is possible to assign a callable Python object that is not a ctypes
- type, in this case the function is assumed to return a C :ctype:`int`, and
+ type, in this case the function is assumed to return a C :c:type:`int`, and
the callable will be called with this integer, allowing to do further
processing or error checking. Using this is deprecated, for more flexible
post processing or error checking use a ctypes data type as
@@ -2115,21 +2115,21 @@ These are the fundamental ctypes data types:
.. class:: c_byte
- Represents the C :ctype:`signed char` datatype, and interprets the value as
+ Represents the C :c:type:`signed char` datatype, and interprets the value as
small integer. The constructor accepts an optional integer initializer; no
overflow checking is done.
.. class:: c_char
- Represents the C :ctype:`char` datatype, and interprets the value as a single
+ Represents the C :c:type:`char` datatype, and interprets the value as a single
character. The constructor accepts an optional string initializer, the
length of the string must be exactly one character.
.. class:: c_char_p
- Represents the C :ctype:`char *` datatype when it points to a zero-terminated
+ Represents the C :c:type:`char *` datatype when it points to a zero-terminated
string. For a general character pointer that may also point to binary data,
``POINTER(c_char)`` must be used. The constructor accepts an integer
address, or a bytes object.
@@ -2137,180 +2137,180 @@ These are the fundamental ctypes data types:
.. class:: c_double
- Represents the C :ctype:`double` datatype. The constructor accepts an
+ Represents the C :c:type:`double` datatype. The constructor accepts an
optional float initializer.
.. class:: c_longdouble
- Represents the C :ctype:`long double` datatype. The constructor accepts an
+ Represents the C :c:type:`long double` datatype. The constructor accepts an
optional float initializer. On platforms where ``sizeof(long double) ==
sizeof(double)`` it is an alias to :class:`c_double`.
.. class:: c_float
- Represents the C :ctype:`float` datatype. The constructor accepts an
+ Represents the C :c:type:`float` datatype. The constructor accepts an
optional float initializer.
.. class:: c_int
- Represents the C :ctype:`signed int` datatype. The constructor accepts an
+ Represents the C :c:type:`signed int` datatype. The constructor accepts an
optional integer initializer; no overflow checking is done. On platforms
where ``sizeof(int) == sizeof(long)`` it is an alias to :class:`c_long`.
.. class:: c_int8
- Represents the C 8-bit :ctype:`signed int` datatype. Usually an alias for
+ Represents the C 8-bit :c:type:`signed int` datatype. Usually an alias for
:class:`c_byte`.
.. class:: c_int16
- Represents the C 16-bit :ctype:`signed int` datatype. Usually an alias for
+ Represents the C 16-bit :c:type:`signed int` datatype. Usually an alias for
:class:`c_short`.
.. class:: c_int32
- Represents the C 32-bit :ctype:`signed int` datatype. Usually an alias for
+ Represents the C 32-bit :c:type:`signed int` datatype. Usually an alias for
:class:`c_int`.
.. class:: c_int64
- Represents the C 64-bit :ctype:`signed int` datatype. Usually an alias for
+ Represents the C 64-bit :c:type:`signed int` datatype. Usually an alias for
:class:`c_longlong`.
.. class:: c_long
- Represents the C :ctype:`signed long` datatype. The constructor accepts an
+ Represents the C :c:type:`signed long` datatype. The constructor accepts an
optional integer initializer; no overflow checking is done.
.. class:: c_longlong
- Represents the C :ctype:`signed long long` datatype. The constructor accepts
+ Represents the C :c:type:`signed long long` datatype. The constructor accepts
an optional integer initializer; no overflow checking is done.
.. class:: c_short
- Represents the C :ctype:`signed short` datatype. The constructor accepts an
+ Represents the C :c:type:`signed short` datatype. The constructor accepts an
optional integer initializer; no overflow checking is done.
.. class:: c_size_t
- Represents the C :ctype:`size_t` datatype.
+ Represents the C :c:type:`size_t` datatype.
.. class:: c_ssize_t
- Represents the C :ctype:`ssize_t` datatype.
+ Represents the C :c:type:`ssize_t` datatype.
.. versionadded:: 3.2
.. class:: c_ubyte
- Represents the C :ctype:`unsigned char` datatype, it interprets the value as
+ Represents the C :c:type:`unsigned char` datatype, it interprets the value as
small integer. The constructor accepts an optional integer initializer; no
overflow checking is done.
.. class:: c_uint
- Represents the C :ctype:`unsigned int` datatype. The constructor accepts an
+ Represents the C :c:type:`unsigned int` datatype. The constructor accepts an
optional integer initializer; no overflow checking is done. On platforms
where ``sizeof(int) == sizeof(long)`` it is an alias for :class:`c_ulong`.
.. class:: c_uint8
- Represents the C 8-bit :ctype:`unsigned int` datatype. Usually an alias for
+ Represents the C 8-bit :c:type:`unsigned int` datatype. Usually an alias for
:class:`c_ubyte`.
.. class:: c_uint16
- Represents the C 16-bit :ctype:`unsigned int` datatype. Usually an alias for
+ Represents the C 16-bit :c:type:`unsigned int` datatype. Usually an alias for
:class:`c_ushort`.
.. class:: c_uint32
- Represents the C 32-bit :ctype:`unsigned int` datatype. Usually an alias for
+ Represents the C 32-bit :c:type:`unsigned int` datatype. Usually an alias for
:class:`c_uint`.
.. class:: c_uint64
- Represents the C 64-bit :ctype:`unsigned int` datatype. Usually an alias for
+ Represents the C 64-bit :c:type:`unsigned int` datatype. Usually an alias for
:class:`c_ulonglong`.
.. class:: c_ulong
- Represents the C :ctype:`unsigned long` datatype. The constructor accepts an
+ Represents the C :c:type:`unsigned long` datatype. The constructor accepts an
optional integer initializer; no overflow checking is done.
.. class:: c_ulonglong
- Represents the C :ctype:`unsigned long long` datatype. The constructor
+ Represents the C :c:type:`unsigned long long` datatype. The constructor
accepts an optional integer initializer; no overflow checking is done.
.. class:: c_ushort
- Represents the C :ctype:`unsigned short` datatype. The constructor accepts
+ Represents the C :c:type:`unsigned short` datatype. The constructor accepts
an optional integer initializer; no overflow checking is done.
.. class:: c_void_p
- Represents the C :ctype:`void *` type. The value is represented as integer.
+ Represents the C :c:type:`void *` type. The value is represented as integer.
The constructor accepts an optional integer initializer.
.. class:: c_wchar
- Represents the C :ctype:`wchar_t` datatype, and interprets the value as a
+ Represents the C :c:type:`wchar_t` datatype, and interprets the value as a
single character unicode string. The constructor accepts an optional string
initializer, the length of the string must be exactly one character.
.. class:: c_wchar_p
- Represents the C :ctype:`wchar_t *` datatype, which must be a pointer to a
+ Represents the C :c:type:`wchar_t *` datatype, which must be a pointer to a
zero-terminated wide character string. The constructor accepts an integer
address, or a string.
.. class:: c_bool
- Represent the C :ctype:`bool` datatype (more accurately, :ctype:`_Bool` from
+ Represent the C :c:type:`bool` datatype (more accurately, :c:type:`_Bool` from
C99). Its value can be True or False, and the constructor accepts any object
that has a truth value.
.. class:: HRESULT
- Windows only: Represents a :ctype:`HRESULT` value, which contains success or
+ Windows only: Represents a :c:type:`HRESULT` value, which contains success or
error information for a function or method call.
.. class:: py_object
- Represents the C :ctype:`PyObject *` datatype. Calling this without an
- argument creates a ``NULL`` :ctype:`PyObject *` pointer.
+ Represents the C :c:type:`PyObject *` datatype. Calling this without an
+ argument creates a ``NULL`` :c:type:`PyObject *` pointer.
The :mod:`ctypes.wintypes` module provides quite some other Windows specific
-data types, for example :ctype:`HWND`, :ctype:`WPARAM`, or :ctype:`DWORD`. Some
-useful structures like :ctype:`MSG` or :ctype:`RECT` are also defined.
+data types, for example :c:type:`HWND`, :c:type:`WPARAM`, or :c:type:`DWORD`. Some
+useful structures like :c:type:`MSG` or :c:type:`RECT` are also defined.
.. _ctypes-structured-data-types:
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
index 197aad2..714286f 100644
--- a/Doc/library/datetime.rst
+++ b/Doc/library/datetime.rst
@@ -396,7 +396,7 @@ Other constructors, all class methods:
Return the local date corresponding to the POSIX timestamp, such as is returned
by :func:`time.time`. This may raise :exc:`ValueError`, if the timestamp is out
- of the range of values supported by the platform C :cfunc:`localtime` function.
+ of the range of values supported by the platform C :c:func:`localtime` function.
It's common for this to be restricted to years from 1970 through 2038. Note
that on non-POSIX systems that include leap seconds in their notion of a
timestamp, leap seconds are ignored by :meth:`fromtimestamp`.
@@ -570,7 +570,7 @@ Instance methods:
Return a string representing the date, for example ``date(2002, 12,
4).ctime() == 'Wed Dec 4 00:00:00 2002'``. ``d.ctime()`` is equivalent to
``time.ctime(time.mktime(d.timetuple()))`` on platforms where the native C
- :cfunc:`ctime` function (which :func:`time.ctime` invokes, but which
+ :c:func:`ctime` function (which :func:`time.ctime` invokes, but which
:meth:`date.ctime` does not invoke) conforms to the C standard.
@@ -677,7 +677,7 @@ Other constructors, all class methods:
or not specified, this is like :meth:`today`, but, if possible, supplies more
precision than can be gotten from going through a :func:`time.time` timestamp
(for example, this may be possible on platforms supplying the C
- :cfunc:`gettimeofday` function).
+ :c:func:`gettimeofday` function).
Else *tz* must be an instance of a class :class:`tzinfo` subclass, and the
current date and time are converted to *tz*'s time zone. In this case the
@@ -705,8 +705,8 @@ Other constructors, all class methods:
``tz.fromutc(datetime.utcfromtimestamp(timestamp).replace(tzinfo=tz))``.
:meth:`fromtimestamp` may raise :exc:`ValueError`, if the timestamp is out of
- the range of values supported by the platform C :cfunc:`localtime` or
- :cfunc:`gmtime` functions. It's common for this to be restricted to years in
+ the range of values supported by the platform C :c:func:`localtime` or
+ :c:func:`gmtime` functions. It's common for this to be restricted to years in
1970 through 2038. Note that on non-POSIX systems that include leap seconds in
their notion of a timestamp, leap seconds are ignored by :meth:`fromtimestamp`,
and then it's possible to have two timestamps differing by a second that yield
@@ -717,7 +717,7 @@ Other constructors, all class methods:
Return the UTC :class:`datetime` corresponding to the POSIX timestamp, with
:attr:`tzinfo` ``None``. This may raise :exc:`ValueError`, if the timestamp is
- out of the range of values supported by the platform C :cfunc:`gmtime` function.
+ out of the range of values supported by the platform C :c:func:`gmtime` function.
It's common for this to be restricted to years in 1970 through 2038. See also
:meth:`fromtimestamp`.
@@ -1056,7 +1056,7 @@ Instance methods:
Return a string representing the date and time, for example ``datetime(2002, 12,
4, 20, 30, 40).ctime() == 'Wed Dec 4 20:30:40 2002'``. ``d.ctime()`` is
equivalent to ``time.ctime(time.mktime(d.timetuple()))`` on platforms where the
- native C :cfunc:`ctime` function (which :func:`time.ctime` invokes, but which
+ native C :c:func:`ctime` function (which :func:`time.ctime` invokes, but which
:meth:`datetime.ctime` does not invoke) conforms to the C standard.
diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst
index a4e2e0e..49b5b93 100644
--- a/Doc/library/exceptions.rst
+++ b/Doc/library/exceptions.rst
@@ -177,7 +177,7 @@ The following exceptions are the exceptions that are usually raised.
Raised when an operation runs out of memory but the situation may still be
rescued (by deleting some objects). The associated value is a string indicating
what kind of (internal) operation ran out of memory. Note that because of the
- underlying memory management architecture (C's :cfunc:`malloc` function), the
+ underlying memory management architecture (C's :c:func:`malloc` function), the
interpreter may not always be able to completely recover from this situation; it
nevertheless raises an exception so that a stack traceback can be printed, in
case a run-away program was the cause.
@@ -204,8 +204,8 @@ The following exceptions are the exceptions that are usually raised.
This exception is derived from :exc:`EnvironmentError`. It is raised when a
function returns a system-related error (not for illegal argument types or
other incidental errors). The :attr:`errno` attribute is a numeric error
- code from :cdata:`errno`, and the :attr:`strerror` attribute is the
- corresponding string, as would be printed by the C function :cfunc:`perror`.
+ code from :c:data:`errno`, and the :attr:`strerror` attribute is the
+ corresponding string, as would be printed by the C function :c:func:`perror`.
See the module :mod:`errno`, which contains names for the error codes defined
by the underlying operating system.
@@ -275,7 +275,7 @@ The following exceptions are the exceptions that are usually raised.
This exception is raised by the :func:`sys.exit` function. When it is not
handled, the Python interpreter exits; no stack traceback is printed. If the
associated value is an integer, it specifies the system exit status (passed
- to C's :cfunc:`exit` function); if it is ``None``, the exit status is zero;
+ to C's :c:func:`exit` function); if it is ``None``, the exit status is zero;
if it has another type (such as a string), the object's value is printed and
the exit status is one.
@@ -348,9 +348,9 @@ The following exceptions are the exceptions that are usually raised.
.. exception:: WindowsError
Raised when a Windows-specific error occurs or when the error number does not
- correspond to an :cdata:`errno` value. The :attr:`winerror` and
+ correspond to an :c:data:`errno` value. The :attr:`winerror` and
:attr:`strerror` values are created from the return values of the
- :cfunc:`GetLastError` and :cfunc:`FormatMessage` functions from the Windows
+ :c:func:`GetLastError` and :c:func:`FormatMessage` functions from the Windows
Platform API. The :attr:`errno` value maps the :attr:`winerror` value to
corresponding ``errno.h`` values. This is a subclass of :exc:`OSError`.
diff --git a/Doc/library/fcntl.rst b/Doc/library/fcntl.rst
index dd76d65..6192400 100644
--- a/Doc/library/fcntl.rst
+++ b/Doc/library/fcntl.rst
@@ -12,7 +12,7 @@
pair: UNIX; I/O control
This module performs file control and I/O control on file descriptors. It is an
-interface to the :cfunc:`fcntl` and :cfunc:`ioctl` Unix routines.
+interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines.
All functions in this module take a file descriptor *fd* as their first
argument. This can be an integer file descriptor, such as returned by
@@ -30,17 +30,17 @@ The module defines the following functions:
:mod:`fcntl` module. The argument *arg* is optional, and defaults to the integer
value ``0``. When present, it can either be an integer value, or a string.
With the argument missing or an integer value, the return value of this function
- is the integer return value of the C :cfunc:`fcntl` call. When the argument is
+ is the integer return value of the C :c:func:`fcntl` call. When the argument is
a string it represents a binary structure, e.g. created by :func:`struct.pack`.
The binary data is copied to a buffer whose address is passed to the C
- :cfunc:`fcntl` call. The return value after a successful call is the contents
+ :c:func:`fcntl` call. The return value after a successful call is the contents
of the buffer, converted to a string object. The length of the returned string
will be the same as the length of the *arg* argument. This is limited to 1024
bytes. If the information returned in the buffer by the operating system is
larger than 1024 bytes, this is most likely to result in a segmentation
violation or a more subtle data corruption.
- If the :cfunc:`fcntl` fails, an :exc:`IOError` is raised.
+ If the :c:func:`fcntl` fails, an :exc:`IOError` is raised.
.. function:: ioctl(fd, op[, arg[, mutate_flag]])
@@ -91,7 +91,7 @@ The module defines the following functions:
Perform the lock operation *op* on file descriptor *fd* (file objects providing
a :meth:`fileno` method are accepted as well). See the Unix manual
:manpage:`flock(2)` for details. (On some systems, this function is emulated
- using :cfunc:`fcntl`.)
+ using :c:func:`fcntl`.)
.. function:: lockf(fd, operation, [length, [start, [whence]]])
diff --git a/Doc/library/getopt.rst b/Doc/library/getopt.rst
index f969d7e..b80af01 100644
--- a/Doc/library/getopt.rst
+++ b/Doc/library/getopt.rst
@@ -7,13 +7,13 @@
.. note::
The :mod:`getopt` module is a parser for command line options whose API is
- designed to be familiar to users of the C :cfunc:`getopt` function. Users who
- are unfamiliar with the C :cfunc:`getopt` function or who would like to write
+ designed to be familiar to users of the C :c:func:`getopt` function. Users who
+ are unfamiliar with the C :c:func:`getopt` function or who would like to write
less code and get better help and error messages should consider using the
:mod:`argparse` module instead.
This module helps scripts to parse the command line arguments in ``sys.argv``.
-It supports the same conventions as the Unix :cfunc:`getopt` function (including
+It supports the same conventions as the Unix :c:func:`getopt` function (including
the special meanings of arguments of the form '``-``' and '``--``'). Long
options similar to those supported by GNU software may be used as well via an
optional third argument.
@@ -31,11 +31,11 @@ exception:
be parsed, without the leading reference to the running program. Typically, this
means ``sys.argv[1:]``. *shortopts* is the string of option letters that the
script wants to recognize, with options that require an argument followed by a
- colon (``':'``; i.e., the same format that Unix :cfunc:`getopt` uses).
+ colon (``':'``; i.e., the same format that Unix :c:func:`getopt` uses).
.. note::
- Unlike GNU :cfunc:`getopt`, after a non-option argument, all further
+ Unlike GNU :c:func:`getopt`, after a non-option argument, all further
arguments are considered also non-options. This is similar to the way
non-GNU Unix systems work.
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
index 572a401..fe2bc29 100644
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -293,7 +293,7 @@ attributes:
.. impl-detail::
getsets are attributes defined in extension modules via
- :ctype:`PyGetSetDef` structures. For Python implementations without such
+ :c:type:`PyGetSetDef` structures. For Python implementations without such
types, this method will always return ``False``.
@@ -304,7 +304,7 @@ attributes:
.. impl-detail::
Member descriptors are attributes defined in extension modules via
- :ctype:`PyMemberDef` structures. For Python implementations without such
+ :c:type:`PyMemberDef` structures. For Python implementations without such
types, this method will always return ``False``.
diff --git a/Doc/library/locale.rst b/Doc/library/locale.rst
index b9c001f..c15f7e3 100644
--- a/Doc/library/locale.rst
+++ b/Doc/library/locale.rst
@@ -215,7 +215,7 @@ The :mod:`locale` module defines the following exception and functions:
.. note::
- The expression is in the syntax suitable for the :cfunc:`regex` function
+ The expression is in the syntax suitable for the :c:func:`regex` function
from the C library, which might differ from the syntax used in :mod:`re`.
.. data:: NOEXPR
@@ -530,7 +530,7 @@ catalogs, and the C library's search algorithms for locating message catalogs.
Python applications should normally find no need to invoke these functions, and
should use :mod:`gettext` instead. A known exception to this rule are
applications that link use additional C libraries which internally invoke
-:cfunc:`gettext` or :func:`dcgettext`. For these applications, it may be
+:c:func:`gettext` or :func:`dcgettext`. For these applications, it may be
necessary to bind the text domain, so that the libraries can properly locate
their message catalogs.
diff --git a/Doc/library/mailbox.rst b/Doc/library/mailbox.rst
index 7409af5..b041d94 100644
--- a/Doc/library/mailbox.rst
+++ b/Doc/library/mailbox.rst
@@ -452,7 +452,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
unlock()
Three locking mechanisms are used---dot locking and, if available, the
- :cfunc:`flock` and :cfunc:`lockf` system calls.
+ :c:func:`flock` and :c:func:`lockf` system calls.
.. seealso::
@@ -566,7 +566,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
unlock()
Three locking mechanisms are used---dot locking and, if available, the
- :cfunc:`flock` and :cfunc:`lockf` system calls. For MH mailboxes, locking
+ :c:func:`flock` and :c:func:`lockf` system calls. For MH mailboxes, locking
the mailbox means locking the :file:`.mh_sequences` file and, only for the
duration of any operations that affect them, locking individual message
files.
@@ -664,7 +664,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
unlock()
Three locking mechanisms are used---dot locking and, if available, the
- :cfunc:`flock` and :cfunc:`lockf` system calls.
+ :c:func:`flock` and :c:func:`lockf` system calls.
.. seealso::
@@ -715,7 +715,7 @@ Maildir, mbox, MH, Babyl, and MMDF.
unlock()
Three locking mechanisms are used---dot locking and, if available, the
- :cfunc:`flock` and :cfunc:`lockf` system calls.
+ :c:func:`flock` and :c:func:`lockf` system calls.
.. seealso::
diff --git a/Doc/library/msilib.rst b/Doc/library/msilib.rst
index 1e6946d..138060d 100644
--- a/Doc/library/msilib.rst
+++ b/Doc/library/msilib.rst
@@ -42,7 +42,7 @@ structures.
.. function:: UuidCreate()
Return the string representation of a new unique identifier. This wraps the
- Windows API functions :cfunc:`UuidCreate` and :cfunc:`UuidToString`.
+ Windows API functions :c:func:`UuidCreate` and :c:func:`UuidToString`.
.. function:: OpenDatabase(path, persist)
@@ -58,7 +58,7 @@ structures.
.. function:: CreateRecord(count)
- Return a new record object by calling :cfunc:`MSICreateRecord`. *count* is the
+ Return a new record object by calling :c:func:`MSICreateRecord`. *count* is the
number of fields of the record.
@@ -133,20 +133,20 @@ Database Objects
.. method:: Database.OpenView(sql)
- Return a view object, by calling :cfunc:`MSIDatabaseOpenView`. *sql* is the SQL
+ Return a view object, by calling :c:func:`MSIDatabaseOpenView`. *sql* is the SQL
statement to execute.
.. method:: Database.Commit()
Commit the changes pending in the current transaction, by calling
- :cfunc:`MSIDatabaseCommit`.
+ :c:func:`MSIDatabaseCommit`.
.. method:: Database.GetSummaryInformation(count)
Return a new summary information object, by calling
- :cfunc:`MsiGetSummaryInformation`. *count* is the maximum number of updated
+ :c:func:`MsiGetSummaryInformation`. *count* is the maximum number of updated
values.
@@ -164,7 +164,7 @@ View Objects
.. method:: View.Execute(params)
- Execute the SQL query of the view, through :cfunc:`MSIViewExecute`. If
+ Execute the SQL query of the view, through :c:func:`MSIViewExecute`. If
*params* is not ``None``, it is a record describing actual values of the
parameter tokens in the query.
@@ -172,18 +172,18 @@ View Objects
.. method:: View.GetColumnInfo(kind)
Return a record describing the columns of the view, through calling
- :cfunc:`MsiViewGetColumnInfo`. *kind* can be either ``MSICOLINFO_NAMES`` or
+ :c:func:`MsiViewGetColumnInfo`. *kind* can be either ``MSICOLINFO_NAMES`` or
``MSICOLINFO_TYPES``.
.. method:: View.Fetch()
- Return a result record of the query, through calling :cfunc:`MsiViewFetch`.
+ Return a result record of the query, through calling :c:func:`MsiViewFetch`.
.. method:: View.Modify(kind, data)
- Modify the view, by calling :cfunc:`MsiViewModify`. *kind* can be one of
+ Modify the view, by calling :c:func:`MsiViewModify`. *kind* can be one of
``MSIMODIFY_SEEK``, ``MSIMODIFY_REFRESH``, ``MSIMODIFY_INSERT``,
``MSIMODIFY_UPDATE``, ``MSIMODIFY_ASSIGN``, ``MSIMODIFY_REPLACE``,
``MSIMODIFY_MERGE``, ``MSIMODIFY_DELETE``, ``MSIMODIFY_INSERT_TEMPORARY``,
@@ -195,7 +195,7 @@ View Objects
.. method:: View.Close()
- Close the view, through :cfunc:`MsiViewClose`.
+ Close the view, through :c:func:`MsiViewClose`.
.. seealso::
@@ -214,7 +214,7 @@ Summary Information Objects
.. method:: SummaryInformation.GetProperty(field)
- Return a property of the summary, through :cfunc:`MsiSummaryInfoGetProperty`.
+ Return a property of the summary, through :c:func:`MsiSummaryInfoGetProperty`.
*field* is the name of the property, and can be one of the constants
``PID_CODEPAGE``, ``PID_TITLE``, ``PID_SUBJECT``, ``PID_AUTHOR``,
``PID_KEYWORDS``, ``PID_COMMENTS``, ``PID_TEMPLATE``, ``PID_LASTAUTHOR``,
@@ -226,12 +226,12 @@ Summary Information Objects
.. method:: SummaryInformation.GetPropertyCount()
Return the number of summary properties, through
- :cfunc:`MsiSummaryInfoGetPropertyCount`.
+ :c:func:`MsiSummaryInfoGetPropertyCount`.
.. method:: SummaryInformation.SetProperty(field, value)
- Set a property through :cfunc:`MsiSummaryInfoSetProperty`. *field* can have the
+ Set a property through :c:func:`MsiSummaryInfoSetProperty`. *field* can have the
same values as in :meth:`GetProperty`, *value* is the new value of the property.
Possible value types are integer and string.
@@ -239,7 +239,7 @@ Summary Information Objects
.. method:: SummaryInformation.Persist()
Write the modified properties to the summary information stream, using
- :cfunc:`MsiSummaryInfoPersist`.
+ :c:func:`MsiSummaryInfoPersist`.
.. seealso::
@@ -258,7 +258,7 @@ Record Objects
.. method:: Record.GetFieldCount()
Return the number of fields of the record, through
- :cfunc:`MsiRecordGetFieldCount`.
+ :c:func:`MsiRecordGetFieldCount`.
.. method:: Record.GetInteger(field)
@@ -275,25 +275,25 @@ Record Objects
.. method:: Record.SetString(field, value)
- Set *field* to *value* through :cfunc:`MsiRecordSetString`. *field* must be an
+ Set *field* to *value* through :c:func:`MsiRecordSetString`. *field* must be an
integer; *value* a string.
.. method:: Record.SetStream(field, value)
Set *field* to the contents of the file named *value*, through
- :cfunc:`MsiRecordSetStream`. *field* must be an integer; *value* a string.
+ :c:func:`MsiRecordSetStream`. *field* must be an integer; *value* a string.
.. method:: Record.SetInteger(field, value)
- Set *field* to *value* through :cfunc:`MsiRecordSetInteger`. Both *field* and
+ Set *field* to *value* through :c:func:`MsiRecordSetInteger`. Both *field* and
*value* must be an integer.
.. method:: Record.ClearData()
- Set all fields of the record to 0, through :cfunc:`MsiRecordClearData`.
+ Set all fields of the record to 0, through :c:func:`MsiRecordClearData`.
.. seealso::
diff --git a/Doc/library/msvcrt.rst b/Doc/library/msvcrt.rst
index 7636b6f..889a0c5 100644
--- a/Doc/library/msvcrt.rst
+++ b/Doc/library/msvcrt.rst
@@ -143,5 +143,5 @@ Other Functions
.. function:: heapmin()
- Force the :cfunc:`malloc` heap to clean itself up and return unused blocks to
+ Force the :c:func:`malloc` heap to clean itself up and return unused blocks to
the operating system. On failure, this raises :exc:`IOError`.
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
index 4e41293..e7f9afe 100644
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -406,7 +406,7 @@ The :mod:`multiprocessing` package mostly replicates the API of the
.. method:: terminate()
Terminate the process. On Unix this is done using the ``SIGTERM`` signal;
- on Windows :cfunc:`TerminateProcess` is used. Note that exit handlers and
+ on Windows :c:func:`TerminateProcess` is used. Note that exit handlers and
finally clauses, etc., will not be executed.
Note that descendant processes of the process will *not* be terminated --
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 0a8f06f..b22c2e9 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -122,7 +122,7 @@ process and user.
On some platforms, including FreeBSD and Mac OS X, setting ``environ`` may
cause memory leaks. Refer to the system documentation for
- :cfunc:`putenv`.
+ :c:func:`putenv`.
If :func:`putenv` is not provided, a modified copy of this mapping may be
passed to the appropriate process-creation functions to cause child processes
@@ -394,7 +394,7 @@ process and user.
.. function:: setpgrp()
- Call the system call :cfunc:`setpgrp` or :cfunc:`setpgrp(0, 0)` depending on
+ Call the system call :c:func:`setpgrp` or :c:func:`setpgrp(0, 0)` depending on
which version is implemented (if any). See the Unix manual for the semantics.
Availability: Unix.
@@ -402,7 +402,7 @@ process and user.
.. function:: setpgid(pid, pgrp)
- Call the system call :cfunc:`setpgid` to set the process group id of the
+ Call the system call :c:func:`setpgid` to set the process group id of the
process with id *pid* to the process group with id *pgrp*. See the Unix manual
for the semantics.
@@ -443,14 +443,14 @@ process and user.
.. function:: getsid(pid)
- Call the system call :cfunc:`getsid`. See the Unix manual for the semantics.
+ Call the system call :c:func:`getsid`. See the Unix manual for the semantics.
Availability: Unix.
.. function:: setsid()
- Call the system call :cfunc:`setsid`. See the Unix manual for the semantics.
+ Call the system call :c:func:`setsid`. See the Unix manual for the semantics.
Availability: Unix.
@@ -468,7 +468,7 @@ process and user.
.. function:: strerror(code)
Return the error message corresponding to the error code in *code*.
- On platforms where :cfunc:`strerror` returns ``NULL`` when given an unknown
+ On platforms where :c:func:`strerror` returns ``NULL`` when given an unknown
error number, :exc:`ValueError` is raised.
Availability: Unix, Windows.
@@ -541,7 +541,7 @@ These functions create new :term:`file objects <file object>`. (See also :func:`
``'r'``, ``'w'``, or ``'a'``, otherwise a :exc:`ValueError` is raised.
On Unix, when the *mode* argument starts with ``'a'``, the *O_APPEND* flag is
- set on the file descriptor (which the :cfunc:`fdopen` implementation already
+ set on the file descriptor (which the :c:func:`fdopen` implementation already
does on most platforms).
Availability: Unix, Windows.
@@ -677,7 +677,7 @@ as internal buffering of data.
.. function:: fsync(fd)
Force write of file with filedescriptor *fd* to disk. On Unix, this calls the
- native :cfunc:`fsync` function; on Windows, the MS :cfunc:`_commit` function.
+ native :c:func:`fsync` function; on Windows, the MS :c:func:`_commit` function.
If you're starting with a buffered Python :term:`file object` *f*, first do
``f.flush()``, and then do ``os.fsync(f.fileno())``, to ensure that all internal
@@ -1117,13 +1117,13 @@ Files and Directories
.. function:: major(device)
Extract the device major number from a raw device number (usually the
- :attr:`st_dev` or :attr:`st_rdev` field from :ctype:`stat`).
+ :attr:`st_dev` or :attr:`st_rdev` field from :c:type:`stat`).
.. function:: minor(device)
Extract the device minor number from a raw device number (usually the
- :attr:`st_dev` or :attr:`st_rdev` field from :ctype:`stat`).
+ :attr:`st_dev` or :attr:`st_rdev` field from :c:type:`stat`).
.. function:: makedev(major, minor)
@@ -1271,8 +1271,8 @@ Files and Directories
.. function:: stat(path)
- Perform a :cfunc:`stat` system call on the given path. The return value is an
- object whose attributes correspond to the members of the :ctype:`stat`
+ Perform a :c:func:`stat` system call on the given path. The return value is an
+ object whose attributes correspond to the members of the :c:type:`stat`
structure, namely: :attr:`st_mode` (protection bits), :attr:`st_ino` (inode
number), :attr:`st_dev` (device), :attr:`st_nlink` (number of hard links),
:attr:`st_uid` (user id of owner), :attr:`st_gid` (group id of owner),
@@ -1306,12 +1306,12 @@ Files and Directories
For backward compatibility, the return value of :func:`stat` is also accessible
as a tuple of at least 10 integers giving the most important (and portable)
- members of the :ctype:`stat` structure, in the order :attr:`st_mode`,
+ members of the :c:type:`stat` structure, in the order :attr:`st_mode`,
:attr:`st_ino`, :attr:`st_dev`, :attr:`st_nlink`, :attr:`st_uid`,
:attr:`st_gid`, :attr:`st_size`, :attr:`st_atime`, :attr:`st_mtime`,
:attr:`st_ctime`. More items may be added at the end by some implementations.
The standard module :mod:`stat` defines functions and constants that are useful
- for extracting information from a :ctype:`stat` structure. (On Windows, some
+ for extracting information from a :c:type:`stat` structure. (On Windows, some
items are filled with dummy values.)
.. note::
@@ -1352,9 +1352,9 @@ Files and Directories
.. function:: statvfs(path)
- Perform a :cfunc:`statvfs` system call on the given path. The return value is
+ Perform a :c:func:`statvfs` system call on the given path. The return value is
an object whose attributes describe the filesystem on the given path, and
- correspond to the members of the :ctype:`statvfs` structure, namely:
+ correspond to the members of the :c:type:`statvfs` structure, namely:
:attr:`f_bsize`, :attr:`f_frsize`, :attr:`f_blocks`, :attr:`f_bfree`,
:attr:`f_bavail`, :attr:`f_files`, :attr:`f_ffree`, :attr:`f_favail`,
:attr:`f_flag`, :attr:`f_namemax`.
@@ -1514,7 +1514,7 @@ The various :func:`exec\*` functions take a list of arguments for the new
program loaded into the process. In each case, the first of these arguments is
passed to the new program as its own name rather than as an argument a user may
have typed on a command line. For the C programmer, this is the ``argv[0]``
-passed to a program's :cfunc:`main`. For example, ``os.execv('/bin/echo',
+passed to a program's :c:func:`main`. For example, ``os.execv('/bin/echo',
['foo', 'bar'])`` will only print ``bar`` on standard output; ``foo`` will seem
to be ignored.
@@ -1918,7 +1918,7 @@ written in Python, such as a mail server's external command delivery program.
There is no option to wait for the application to close, and no way to retrieve
the application's exit status. The *path* parameter is relative to the current
directory. If you want to use an absolute path, make sure the first character
- is not a slash (``'/'``); the underlying Win32 :cfunc:`ShellExecute` function
+ is not a slash (``'/'``); the underlying Win32 :c:func:`ShellExecute` function
doesn't work if it is. Use the :func:`os.path.normpath` function to ensure that
the path is properly encoded for Win32.
@@ -1928,13 +1928,13 @@ written in Python, such as a mail server's external command delivery program.
.. function:: system(command)
Execute the command (a string) in a subshell. This is implemented by calling
- the Standard C function :cfunc:`system`, and has the same limitations.
+ the Standard C function :c:func:`system`, and has the same limitations.
Changes to :data:`sys.stdin`, etc. are not reflected in the environment of the
executed command.
On Unix, the return value is the exit status of the process encoded in the
format specified for :func:`wait`. Note that POSIX does not specify the meaning
- of the return value of the C :cfunc:`system` function, so the return value of
+ of the return value of the C :c:func:`system` function, so the return value of
the Python function is system-dependent.
On Windows, the return value is that returned by the system shell after running
diff --git a/Doc/library/ossaudiodev.rst b/Doc/library/ossaudiodev.rst
index 82a263f..3128b0a 100644
--- a/Doc/library/ossaudiodev.rst
+++ b/Doc/library/ossaudiodev.rst
@@ -56,7 +56,7 @@ the standard audio interface for Linux and recent versions of FreeBSD.
what went wrong.
(If :mod:`ossaudiodev` receives an error from a system call such as
- :cfunc:`open`, :cfunc:`write`, or :cfunc:`ioctl`, it raises :exc:`IOError`.
+ :c:func:`open`, :c:func:`write`, or :c:func:`ioctl`, it raises :exc:`IOError`.
Errors detected directly by :mod:`ossaudiodev` result in :exc:`OSSAudioError`.)
(For backwards compatibility, the exception class is also available as
diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst
index f4ef680..1fe1031 100644
--- a/Doc/library/platform.rst
+++ b/Doc/library/platform.rst
@@ -27,8 +27,8 @@ Cross Platform
returned as strings.
Values that cannot be determined are returned as given by the parameter presets.
- If bits is given as ``''``, the :cfunc:`sizeof(pointer)` (or
- :cfunc:`sizeof(long)` on Python version < 1.5.2) is used as indicator for the
+ If bits is given as ``''``, the :c:func:`sizeof(pointer)` (or
+ :c:func:`sizeof(long)` on Python version < 1.5.2) is used as indicator for the
supported pointer size.
The function relies on the system's :file:`file` command to do the actual work.
@@ -215,7 +215,7 @@ Mac OS Platform
Entries which cannot be determined are set to ``''``. All tuple entries are
strings.
- Documentation for the underlying :cfunc:`gestalt` API is available online at
+ Documentation for the underlying :c:func:`gestalt` API is available online at
http://www.rgaros.nl/gestalt/.
diff --git a/Doc/library/posix.rst b/Doc/library/posix.rst
index d65b999..07db2b2 100644
--- a/Doc/library/posix.rst
+++ b/Doc/library/posix.rst
@@ -38,13 +38,13 @@ Large File Support
Several operating systems (including AIX, HP-UX, Irix and Solaris) provide
support for files that are larger than 2 GB from a C programming model where
-:ctype:`int` and :ctype:`long` are 32-bit values. This is typically accomplished
+:c:type:`int` and :c:type:`long` are 32-bit values. This is typically accomplished
by defining the relevant size and offset types as 64-bit values. Such files are
sometimes referred to as :dfn:`large files`.
-Large file support is enabled in Python when the size of an :ctype:`off_t` is
-larger than a :ctype:`long` and the :ctype:`long long` type is available and is
-at least as large as an :ctype:`off_t`.
+Large file support is enabled in Python when the size of an :c:type:`off_t` is
+larger than a :c:type:`long` and the :c:type:`long long` type is available and is
+at least as large as an :c:type:`off_t`.
It may be necessary to configure and compile Python with certain compiler flags
to enable this mode. For example, it is enabled by default with recent versions
of Irix, but with Solaris 2.6 and 2.7 you need to do something like::
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index 9787bcb..206f4d9 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -1057,14 +1057,14 @@ Simulating scanf()
.. index:: single: scanf()
-Python does not currently have an equivalent to :cfunc:`scanf`. Regular
+Python does not currently have an equivalent to :c:func:`scanf`. Regular
expressions are generally more powerful, though also more verbose, than
-:cfunc:`scanf` format strings. The table below offers some more-or-less
-equivalent mappings between :cfunc:`scanf` format tokens and regular
+:c:func:`scanf` format strings. The table below offers some more-or-less
+equivalent mappings between :c:func:`scanf` format tokens and regular
expressions.
+--------------------------------+---------------------------------------------+
-| :cfunc:`scanf` Token | Regular Expression |
+| :c:func:`scanf` Token | Regular Expression |
+================================+=============================================+
| ``%c`` | ``.`` |
+--------------------------------+---------------------------------------------+
@@ -1089,7 +1089,7 @@ To extract the filename and numbers from a string like ::
/usr/sbin/sendmail - 0 errors, 4 warnings
-you would use a :cfunc:`scanf` format like ::
+you would use a :c:func:`scanf` format like ::
%s - %d errors, %d warnings
diff --git a/Doc/library/select.rst b/Doc/library/select.rst
index 5e848b0..6730910 100644
--- a/Doc/library/select.rst
+++ b/Doc/library/select.rst
@@ -5,9 +5,9 @@
:synopsis: Wait for I/O completion on multiple streams.
-This module provides access to the :cfunc:`select` and :cfunc:`poll` functions
-available in most operating systems, :cfunc:`epoll` available on Linux 2.5+ and
-:cfunc:`kqueue` available on most BSD.
+This module provides access to the :c:func:`select` and :c:func:`poll` functions
+available in most operating systems, :c:func:`epoll` available on Linux 2.5+ and
+:c:func:`kqueue` available on most BSD.
Note that on Windows, it only works for sockets; on other operating systems,
it also works for other file types (in particular, on Unix, it works on pipes).
It cannot be used on regular files to determine whether a file has grown since
@@ -19,8 +19,8 @@ The module defines the following:
.. exception:: error
The exception raised when an error occurs. The accompanying value is a pair
- containing the numeric error code from :cdata:`errno` and the corresponding
- string, as would be printed by the C function :cfunc:`perror`.
+ containing the numeric error code from :c:data:`errno` and the corresponding
+ string, as would be printed by the C function :c:func:`perror`.
.. function:: epoll(sizehint=-1)
@@ -53,7 +53,7 @@ The module defines the following:
.. function:: select(rlist, wlist, xlist[, timeout])
- This is a straightforward interface to the Unix :cfunc:`select` system call.
+ This is a straightforward interface to the Unix :c:func:`select` system call.
The first three arguments are sequences of 'waitable objects': either
integers representing file descriptors or objects with a parameterless method
named :meth:`fileno` returning such an integer:
@@ -90,7 +90,7 @@ The module defines the following:
.. index:: single: WinSock
File objects on Windows are not acceptable, but sockets are. On Windows,
- the underlying :cfunc:`select` function is provided by the WinSock
+ the underlying :c:func:`select` function is provided by the WinSock
library, and does not handle file descriptors that don't originate from
WinSock.
@@ -189,13 +189,13 @@ Edge and Level Trigger Polling (epoll) Objects
Polling Objects
---------------
-The :cfunc:`poll` system call, supported on most Unix systems, provides better
+The :c:func:`poll` system call, supported on most Unix systems, provides better
scalability for network servers that service many, many clients at the same
-time. :cfunc:`poll` scales better because the system call only requires listing
-the file descriptors of interest, while :cfunc:`select` builds a bitmap, turns
+time. :c:func:`poll` scales better because the system call only requires listing
+the file descriptors of interest, while :c:func:`select` builds a bitmap, turns
on bits for the fds of interest, and then afterward the whole bitmap has to be
-linearly scanned again. :cfunc:`select` is O(highest file descriptor), while
-:cfunc:`poll` is O(number of file descriptors).
+linearly scanned again. :c:func:`select` is O(highest file descriptor), while
+:c:func:`poll` is O(number of file descriptors).
.. method:: poll.register(fd[, eventmask])
diff --git a/Doc/library/signal.rst b/Doc/library/signal.rst
index 7d8d7d6..698b1e7 100644
--- a/Doc/library/signal.rst
+++ b/Doc/library/signal.rst
@@ -68,7 +68,7 @@ The variables defined in the :mod:`signal` module are:
All the signal numbers are defined symbolically. For example, the hangup signal
is defined as :const:`signal.SIGHUP`; the variable names are identical to the
names used in C programs, as found in ``<signal.h>``. The Unix man page for
- ':cfunc:`signal`' lists the existing signals (on some systems this is
+ ':c:func:`signal`' lists the existing signals (on some systems this is
:manpage:`signal(2)`, on others the list is in :manpage:`signal(7)`). Note that
not all systems define the same set of signal names; only those names defined by
the system are defined by this module.
@@ -210,7 +210,7 @@ The :mod:`signal` module defines the following functions:
Note that installing a signal handler with :func:`signal` will reset the
restart behaviour to interruptible by implicitly calling
- :cfunc:`siginterrupt` with a true *flag* value for the given signal.
+ :c:func:`siginterrupt` with a true *flag* value for the given signal.
.. function:: signal(signalnum, handler)
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index c061b04..3a378ea 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -118,7 +118,7 @@ The module :mod:`socket` exports the following constants and functions:
The accompanying value is a pair ``(h_errno, string)`` representing an error
returned by a library call. *string* represents the description of *h_errno*, as
- returned by the :cfunc:`hstrerror` C function.
+ returned by the :c:func:`hstrerror` C function.
.. exception:: gaierror
@@ -126,7 +126,7 @@ The module :mod:`socket` exports the following constants and functions:
This exception is raised for address-related errors, for :func:`getaddrinfo` and
:func:`getnameinfo`. The accompanying value is a pair ``(error, string)``
representing an error returned by a library call. *string* represents the
- description of *error*, as returned by the :cfunc:`gai_strerror` C function. The
+ description of *error*, as returned by the :c:func:`gai_strerror` C function. The
*error* value will match one of the :const:`EAI_\*` constants defined in this
module.
@@ -415,7 +415,7 @@ The module :mod:`socket` exports the following constants and functions:
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 :ctype:`struct in_addr`, which is the C type
+ library and needs objects of type :c:type:`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
@@ -423,7 +423,7 @@ The module :mod:`socket` exports the following constants and functions:
If the IPv4 address string passed to this function is invalid,
:exc:`socket.error` will be raised. Note that exactly what is valid depends on
- the underlying C implementation of :cfunc:`inet_aton`.
+ the underlying C implementation of :c:func:`inet_aton`.
:func:`inet_aton` does not support IPv6, and :func:`inet_pton` should be used
instead for IPv4/v6 dual stack support.
@@ -434,7 +434,7 @@ The module :mod:`socket` exports the following constants and functions:
Convert a 32-bit packed IPv4 address (a bytes object four characters 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 :ctype:`struct in_addr`, which
+ standard C library and needs objects of type :c:type:`struct in_addr`, which
is the C type for the 32-bit packed binary data this function takes as an
argument.
@@ -448,14 +448,14 @@ The module :mod:`socket` exports the following constants and functions:
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 :ctype:`struct in_addr` (similar to
- :func:`inet_aton`) or :ctype:`struct in6_addr`.
+ calls for an object of type :c:type:`struct in_addr` (similar to
+ :func:`inet_aton`) or :c:type:`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,
:exc:`socket.error` will be raised. Note that exactly what is valid depends on
both the value of *address_family* and the underlying implementation of
- :cfunc:`inet_pton`.
+ :c:func:`inet_pton`.
Availability: Unix (maybe not all platforms).
@@ -465,8 +465,8 @@ The module :mod:`socket` exports the following constants and functions:
Convert a packed IP address (a bytes object of some number of characters) 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 :ctype:`struct in_addr` (similar to :func:`inet_ntoa`)
- or :ctype:`struct in6_addr`.
+ returns an object of type :c:type:`struct in_addr` (similar to :func:`inet_ntoa`)
+ or :c:type:`struct in6_addr`.
Supported values for *address_family* are currently :const:`AF_INET` and
:const:`AF_INET6`. If the string *packed_ip* is not the correct length for the
@@ -541,10 +541,10 @@ correspond to Unix system calls applicable to sockets.
.. method:: socket.connect_ex(address)
Like ``connect(address)``, but return an error indicator instead of raising an
- exception for errors returned by the C-level :cfunc:`connect` call (other
+ exception for errors returned by the C-level :c:func:`connect` call (other
problems, such as "host not found," can still raise exceptions). The error
indicator is ``0`` if the operation succeeded, otherwise the value of the
- :cdata:`errno` variable. This is useful to support, for example, asynchronous
+ :c:data:`errno` variable. This is useful to support, for example, asynchronous
connects.
diff --git a/Doc/library/stat.rst b/Doc/library/stat.rst
index 9100910..b2aec43 100644
--- a/Doc/library/stat.rst
+++ b/Doc/library/stat.rst
@@ -9,8 +9,8 @@
The :mod:`stat` module defines constants and functions for interpreting the
results of :func:`os.stat`, :func:`os.fstat` and :func:`os.lstat` (if they
-exist). For complete details about the :cfunc:`stat`, :cfunc:`fstat` and
-:cfunc:`lstat` calls, consult the documentation for your system.
+exist). For complete details about the :c:func:`stat`, :c:func:`fstat` and
+:c:func:`lstat` calls, consult the documentation for your system.
The :mod:`stat` module defines the following functions to test for specific file
types:
@@ -68,7 +68,7 @@ mode:
Normally, you would use the :func:`os.path.is\*` functions for testing the type
of a file; the functions here are useful when you are doing multiple tests of
-the same file and wish to avoid the overhead of the :cfunc:`stat` system call
+the same file and wish to avoid the overhead of the :c:func:`stat` system call
for each test. These are also useful when checking for information about a file
that isn't handled by :mod:`os.path`, like the tests for block and character
devices.
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 3770fd8..0e2fd38 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -217,7 +217,7 @@ Numeric Types --- :class:`int`, :class:`float`, :class:`complex`
There are three distinct numeric types: :dfn:`integers`, :dfn:`floating
point numbers`, and :dfn:`complex numbers`. In addition, Booleans are a
subtype of integers. Integers have unlimited precision. Floating point
-numbers are usually implemented using :ctype:`double` in C; information
+numbers are usually implemented using :c:type:`double` in C; information
about the precision and internal representation of floating point
numbers for the machine on which your program is running is available
in :data:`sys.float_info`. Complex numbers have a real and imaginary
@@ -1378,7 +1378,7 @@ String objects have one unique built-in operation: the ``%`` operator (modulo).
This is also known as the string *formatting* or *interpolation* operator.
Given ``format % values`` (where *format* is a string), ``%`` conversion
specifications in *format* are replaced with zero or more elements of *values*.
-The effect is similar to the using :cfunc:`sprintf` in the C language.
+The effect is similar to the using :c:func:`sprintf` in the C language.
If *format* requires a single argument, *values* may be a single non-tuple
object. [#]_ Otherwise, *values* must be a tuple with exactly the number of
diff --git a/Doc/library/struct.rst b/Doc/library/struct.rst
index 7878a54..9e6ea85 100644
--- a/Doc/library/struct.rst
+++ b/Doc/library/struct.rst
@@ -157,46 +157,46 @@ is, when the format string starts with one of ``'<'``, ``'>'``, ``'!'`` or
``'='``. When using native size, the size of the packed value is
platform-dependent.
-+--------+-------------------------+--------------------+----------------+------------+
-| Format | C Type | Python type | Standard size | Notes |
-+========+=========================+====================+================+============+
-| ``x`` | pad byte | no value | | |
-+--------+-------------------------+--------------------+----------------+------------+
-| ``c`` | :ctype:`char` | bytes of length 1 | 1 | |
-+--------+-------------------------+--------------------+----------------+------------+
-| ``b`` | :ctype:`signed char` | integer | 1 | \(1),\(4) |
-+--------+-------------------------+--------------------+----------------+------------+
-| ``B`` | :ctype:`unsigned char` | integer | 1 | \(4) |
-+--------+-------------------------+--------------------+----------------+------------+
-| ``?`` | :ctype:`_Bool` | bool | 1 | \(2) |
-+--------+-------------------------+--------------------+----------------+------------+
-| ``h`` | :ctype:`short` | integer | 2 | \(4) |
-+--------+-------------------------+--------------------+----------------+------------+
-| ``H`` | :ctype:`unsigned short` | integer | 2 | \(4) |
-+--------+-------------------------+--------------------+----------------+------------+
-| ``i`` | :ctype:`int` | integer | 4 | \(4) |
-+--------+-------------------------+--------------------+----------------+------------+
-| ``I`` | :ctype:`unsigned int` | integer | 4 | \(4) |
-+--------+-------------------------+--------------------+----------------+------------+
-| ``l`` | :ctype:`long` | integer | 4 | \(4) |
-+--------+-------------------------+--------------------+----------------+------------+
-| ``L`` | :ctype:`unsigned long` | integer | 4 | \(4) |
-+--------+-------------------------+--------------------+----------------+------------+
-| ``q`` | :ctype:`long long` | integer | 8 | \(3), \(4) |
-+--------+-------------------------+--------------------+----------------+------------+
-| ``Q`` | :ctype:`unsigned long | integer | 8 | \(3), \(4) |
-| | long` | | | |
-+--------+-------------------------+--------------------+----------------+------------+
-| ``f`` | :ctype:`float` | float | 4 | \(5) |
-+--------+-------------------------+--------------------+----------------+------------+
-| ``d`` | :ctype:`double` | float | 8 | \(5) |
-+--------+-------------------------+--------------------+----------------+------------+
-| ``s`` | :ctype:`char[]` | bytes | | \(1) |
-+--------+-------------------------+--------------------+----------------+------------+
-| ``p`` | :ctype:`char[]` | bytes | | \(1) |
-+--------+-------------------------+--------------------+----------------+------------+
-| ``P`` | :ctype:`void \*` | integer | | \(6) |
-+--------+-------------------------+--------------------+----------------+------------+
++--------+--------------------------+--------------------+----------------+------------+
+| Format | C Type | Python type | Standard size | Notes |
++========+==========================+====================+================+============+
+| ``x`` | pad byte | no value | | |
++--------+--------------------------+--------------------+----------------+------------+
+| ``c`` | :c:type:`char` | bytes of length 1 | 1 | |
++--------+--------------------------+--------------------+----------------+------------+
+| ``b`` | :c:type:`signed char` | integer | 1 | \(1),\(4) |
++--------+--------------------------+--------------------+----------------+------------+
+| ``B`` | :c:type:`unsigned char` | integer | 1 | \(4) |
++--------+--------------------------+--------------------+----------------+------------+
+| ``?`` | :c:type:`_Bool` | bool | 1 | \(2) |
++--------+--------------------------+--------------------+----------------+------------+
+| ``h`` | :c:type:`short` | integer | 2 | \(4) |
++--------+--------------------------+--------------------+----------------+------------+
+| ``H`` | :c:type:`unsigned short` | integer | 2 | \(4) |
++--------+--------------------------+--------------------+----------------+------------+
+| ``i`` | :c:type:`int` | integer | 4 | \(4) |
++--------+--------------------------+--------------------+----------------+------------+
+| ``I`` | :c:type:`unsigned int` | integer | 4 | \(4) |
++--------+--------------------------+--------------------+----------------+------------+
+| ``l`` | :c:type:`long` | integer | 4 | \(4) |
++--------+--------------------------+--------------------+----------------+------------+
+| ``L`` | :c:type:`unsigned long` | integer | 4 | \(4) |
++--------+--------------------------+--------------------+----------------+------------+
+| ``q`` | :c:type:`long long` | integer | 8 | \(3), \(4) |
++--------+--------------------------+--------------------+----------------+------------+
+| ``Q`` | :c:type:`unsigned long | integer | 8 | \(3), \(4) |
+| | long` | | | |
++--------+--------------------------+--------------------+----------------+------------+
+| ``f`` | :c:type:`float` | float | 4 | \(5) |
++--------+--------------------------+--------------------+----------------+------------+
+| ``d`` | :c:type:`double` | float | 8 | \(5) |
++--------+--------------------------+--------------------+----------------+------------+
+| ``s`` | :c:type:`char[]` | bytes | | \(1) |
++--------+--------------------------+--------------------+----------------+------------+
+| ``p`` | :c:type:`char[]` | bytes | | \(1) |
++--------+--------------------------+--------------------+----------------+------------+
+| ``P`` | :c:type:`void \*` | integer | | \(6) |
++--------+--------------------------+--------------------+----------------+------------+
Notes:
@@ -206,14 +206,14 @@ Notes:
which are encoded using UTF-8.
(2)
- The ``'?'`` conversion code corresponds to the :ctype:`_Bool` type defined by
- C99. If this type is not available, it is simulated using a :ctype:`char`. In
+ The ``'?'`` conversion code corresponds to the :c:type:`_Bool` type defined by
+ C99. If this type is not available, it is simulated using a :c:type:`char`. In
standard mode, it is always represented by one byte.
(3)
The ``'q'`` and ``'Q'`` conversion codes are available in native mode only if
- the platform C compiler supports C :ctype:`long long`, or, on Windows,
- :ctype:`__int64`. They are always available in standard modes.
+ the platform C compiler supports C :c:type:`long long`, or, on Windows,
+ :c:type:`__int64`. They are always available in standard modes.
(4)
When attempting to pack a non-integer using any of the integer conversion
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index 1c8a79c..3671407 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -277,7 +277,7 @@ This module also defines four shortcut functions:
``(status, output)``. *cmd* is actually run as ``{ cmd ; } 2>&1``, so that the
returned output will contain output or error messages. A trailing newline is
stripped from the output. The exit status for the command can be interpreted
- according to the rules for the C function :cfunc:`wait`. Example::
+ according to the rules for the C function :c:func:`wait`. Example::
>>> subprocess.getstatusoutput('ls /bin/ls')
(0, '/bin/ls')
@@ -387,7 +387,7 @@ Instances of the :class:`Popen` class have the following methods:
.. method:: Popen.terminate()
Stop the child. On Posix OSs the method sends SIGTERM to the
- child. On Windows the Win32 API function :cfunc:`TerminateProcess` is called
+ child. On Windows the Win32 API function :c:func:`TerminateProcess` is called
to stop the child.
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index 0bb6f3a..352eb62 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -312,7 +312,7 @@ always available.
.. function:: getdlopenflags()
- Return the current value of the flags that are used for :cfunc:`dlopen` calls.
+ Return the current value of the flags that are used for :c:func:`dlopen` calls.
The flag constants are defined in the :mod:`ctypes` and :mod:`DLFCN` modules.
Availability: Unix.
@@ -457,8 +457,8 @@ always available.
+---------------------------------------+---------------------------------+
- This function wraps the Win32 :cfunc:`GetVersionEx` function; see the
- Microsoft documentation on :cfunc:`OSVERSIONINFOEX` for more information
+ This function wraps the Win32 :c:func:`GetVersionEx` function; see the
+ Microsoft documentation on :c:func:`OSVERSIONINFOEX` for more information
about these fields.
Availability: Windows.
@@ -561,7 +561,7 @@ always available.
.. data:: maxsize
- An integer giving the maximum value a variable of type :ctype:`Py_ssize_t` can
+ An integer giving the maximum value a variable of type :c:type:`Py_ssize_t` can
take. It's usually ``2**31 - 1`` on a 32-bit platform and ``2**63 - 1`` on a
64-bit platform.
@@ -714,7 +714,7 @@ always available.
.. function:: setdlopenflags(n)
- Set the flags used by the interpreter for :cfunc:`dlopen` calls, such as when
+ Set the flags used by the interpreter for :c:func:`dlopen` calls, such as when
the interpreter loads extension modules. Among other things, this will enable a
lazy resolving of symbols when importing a module, if called as
``sys.setdlopenflags(0)``. To share symbols across extension modules, call as
diff --git a/Doc/library/time.rst b/Doc/library/time.rst
index d3b4305..4a14bbb 100644
--- a/Doc/library/time.rst
+++ b/Doc/library/time.rst
@@ -71,8 +71,8 @@ An explanation of some terminology and conventions is in order.
* On the other hand, the precision of :func:`time` and :func:`sleep` is better
than their Unix equivalents: times are expressed as floating point numbers,
:func:`time` returns the most accurate time available (using Unix
- :cfunc:`gettimeofday` where available), and :func:`sleep` will accept a time
- with a nonzero fraction (Unix :cfunc:`select` is used to implement this, where
+ :c:func:`gettimeofday` where available), and :func:`sleep` will accept a time
+ with a nonzero fraction (Unix :c:func:`select` is used to implement this, where
available).
* The time value as returned by :func:`gmtime`, :func:`localtime`, and
@@ -178,7 +178,7 @@ The module defines the following functions and data items:
On Windows, this function returns wall-clock seconds elapsed since the first
call to this function, as a floating point number, based on the Win32 function
- :cfunc:`QueryPerformanceCounter`. The resolution is typically better than one
+ :c:func:`QueryPerformanceCounter`. The resolution is typically better than one
microsecond.
diff --git a/Doc/library/warnings.rst b/Doc/library/warnings.rst
index 25e5db3..309fec5 100644
--- a/Doc/library/warnings.rst
+++ b/Doc/library/warnings.rst
@@ -13,7 +13,7 @@ warrant raising an exception and terminating the program. For example, one
might want to issue a warning when a program uses an obsolete module.
Python programmers issue warnings by calling the :func:`warn` function defined
-in this module. (C programmers use :cfunc:`PyErr_WarnEx`; see
+in this module. (C programmers use :c:func:`PyErr_WarnEx`; see
:ref:`exceptionhandling` for details).
Warning messages are normally written to ``sys.stderr``, but their disposition
diff --git a/Doc/library/winsound.rst b/Doc/library/winsound.rst
index d54c999..8356062 100644
--- a/Doc/library/winsound.rst
+++ b/Doc/library/winsound.rst
@@ -22,7 +22,7 @@ provided by Windows platforms. It includes functions and several constants.
.. function:: PlaySound(sound, flags)
- Call the underlying :cfunc:`PlaySound` function from the Platform API. The
+ Call the underlying :c:func:`PlaySound` function from the Platform API. The
*sound* parameter may be a filename, audio data as a string, or ``None``. Its
interpretation depends on the value of *flags*, which can be a bitwise ORed
combination of the constants described below. If the *sound* parameter is
@@ -32,7 +32,7 @@ provided by Windows platforms. It includes functions and several constants.
.. function:: MessageBeep(type=MB_OK)
- Call the underlying :cfunc:`MessageBeep` function from the Platform API. This
+ Call the underlying :c:func:`MessageBeep` function from the Platform API. This
plays a sound as specified in the registry. The *type* argument specifies which
sound to play; possible values are ``-1``, ``MB_ICONASTERISK``,
``MB_ICONEXCLAMATION``, ``MB_ICONHAND``, ``MB_ICONQUESTION``, and ``MB_OK``, all
diff --git a/Doc/library/zlib.rst b/Doc/library/zlib.rst
index c325df3..a56f521 100644
--- a/Doc/library/zlib.rst
+++ b/Doc/library/zlib.rst
@@ -113,7 +113,7 @@ The available exception and functions in this module are:
*bufsize* is the initial size of the buffer used to hold decompressed data. If
more space is required, the buffer size will be increased as needed, so you
don't have to get this value exactly right; tuning it will only save a few calls
- to :cfunc:`malloc`. The default size is 16384.
+ to :c:func:`malloc`. The default size is 16384.
.. function:: decompressobj([wbits])