@@ -1161,7 +1161,7 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
11611161 function does not steal any references to *exc*. To prevent naive misuse, you
11621162 must write your own C extension to call this. Must be called with the GIL held.
11631163 Returns the number of thread states modified; this is normally one, but will be
1164- zero if the thread id isn't found. If *exc* is :const:` NULL`, the pending
1164+ zero if the thread id isn't found. If *exc* is `` NULL` `, the pending
11651165 exception (if any) for the thread is cleared. This raises no exceptions.
11661166
11671167 .. versionchanged:: 3.7
@@ -1407,32 +1407,32 @@ Python-level trace functions in previous versions.
14071407 The type of the trace function registered using :c:func:`PyEval_SetProfile` and
14081408 :c:func:`PyEval_SetTrace`. The first parameter is the object passed to the
14091409 registration function as *obj*, *frame* is the frame object to which the event
1410- pertains, *what* is one of the constants :const :`PyTrace_CALL`,
1411- :const: `PyTrace_EXCEPTION`, :const: `PyTrace_LINE`, :const :`PyTrace_RETURN`,
1412- :const: `PyTrace_C_CALL`, :const: `PyTrace_C_EXCEPTION`, :const :`PyTrace_C_RETURN`,
1413- or :const :`PyTrace_OPCODE`, and *arg* depends on the value of *what*:
1414-
1415- +------------------------------+----------------------------------------+
1416- | Value of *what* | Meaning of *arg* |
1417- +==============================+========================================+
1418- | :const :`PyTrace_CALL` | Always :c:data:`Py_None`. |
1419- +------------------------------+----------------------------------------+
1420- | :const :`PyTrace_EXCEPTION` | Exception information as returned by |
1421- | | :func:`sys.exc_info`. |
1422- +------------------------------+----------------------------------------+
1423- | :const :`PyTrace_LINE` | Always :c:data:`Py_None`. |
1424- +------------------------------+----------------------------------------+
1425- | :const :`PyTrace_RETURN` | Value being returned to the caller, |
1426- | | or ``NULL`` if caused by an exception. |
1427- +------------------------------+----------------------------------------+
1428- | :const :`PyTrace_C_CALL` | Function object being called. |
1429- +------------------------------+----------------------------------------+
1430- | :const :`PyTrace_C_EXCEPTION` | Function object being called. |
1431- +------------------------------+----------------------------------------+
1432- | :const :`PyTrace_C_RETURN` | Function object being called. |
1433- +------------------------------+----------------------------------------+
1434- | :const :`PyTrace_OPCODE` | Always :c:data:`Py_None`. |
1435- +------------------------------+----------------------------------------+
1410+ pertains, *what* is one of the constants :c:data :`PyTrace_CALL`,
1411+ :c:data: `PyTrace_EXCEPTION`, :c:data: `PyTrace_LINE`, :c:data :`PyTrace_RETURN`,
1412+ :c:data: `PyTrace_C_CALL`, :c:data: `PyTrace_C_EXCEPTION`, :c:data :`PyTrace_C_RETURN`,
1413+ or :c:data :`PyTrace_OPCODE`, and *arg* depends on the value of *what*:
1414+
1415+ +------------------------------- +----------------------------------------+
1416+ | Value of *what* | Meaning of *arg* |
1417+ +=============================== +========================================+
1418+ | :c:data :`PyTrace_CALL` | Always :c:data:`Py_None`. |
1419+ +------------------------------- +----------------------------------------+
1420+ | :c:data :`PyTrace_EXCEPTION` | Exception information as returned by |
1421+ | | :func:`sys.exc_info`. |
1422+ +------------------------------- +----------------------------------------+
1423+ | :c:data :`PyTrace_LINE` | Always :c:data:`Py_None`. |
1424+ +------------------------------- +----------------------------------------+
1425+ | :c:data :`PyTrace_RETURN` | Value being returned to the caller, |
1426+ | | or ``NULL`` if caused by an exception. |
1427+ +------------------------------- +----------------------------------------+
1428+ | :c:data :`PyTrace_C_CALL` | Function object being called. |
1429+ +------------------------------- +----------------------------------------+
1430+ | :c:data :`PyTrace_C_EXCEPTION` | Function object being called. |
1431+ +------------------------------- +----------------------------------------+
1432+ | :c:data :`PyTrace_C_RETURN` | Function object being called. |
1433+ +------------------------------- +----------------------------------------+
1434+ | :c:data :`PyTrace_OPCODE` | Always :c:data:`Py_None`. |
1435+ +------------------------------- +----------------------------------------+
14361436
14371437.. c:var:: int PyTrace_CALL
14381438
@@ -1499,8 +1499,8 @@ Python-level trace functions in previous versions.
14991499 function as its first parameter, and may be any Python object, or ``NULL``. If
15001500 the profile function needs to maintain state, using a different value for *obj*
15011501 for each thread provides a convenient and thread-safe place to store it. The
1502- profile function is called for all monitored events except :const :`PyTrace_LINE`
1503- :const: `PyTrace_OPCODE` and :const :`PyTrace_EXCEPTION`.
1502+ profile function is called for all monitored events except :c:data :`PyTrace_LINE`
1503+ :c:data: `PyTrace_OPCODE` and :c:data :`PyTrace_EXCEPTION`.
15041504
15051505 See also the :func:`sys.setprofile` function.
15061506
@@ -1525,8 +1525,8 @@ Python-level trace functions in previous versions.
15251525 :c:func:`PyEval_SetProfile`, except the tracing function does receive line-number
15261526 events and per-opcode events, but does not receive any event related to C function
15271527 objects being called. Any trace function registered using :c:func:`PyEval_SetTrace`
1528- will not receive :const: `PyTrace_C_CALL`, :const :`PyTrace_C_EXCEPTION` or
1529- :const :`PyTrace_C_RETURN` as a value for the *what* parameter.
1528+ will not receive :c:data: `PyTrace_C_CALL`, :c:data :`PyTrace_C_EXCEPTION` or
1529+ :c:data :`PyTrace_C_RETURN` as a value for the *what* parameter.
15301530
15311531 See also the :func:`sys.settrace` function.
15321532
0 commit comments