Skip to content

Commit 291f8a5

Browse files
committed
[3.13] pythonGH-109975: Copyedit 3.13 What's New: C API (pythonGH-124313)
(cherry picked from commit 9d0a752) Co-authored-by: Adam Turner <[email protected]>
1 parent 112b170 commit 291f8a5

File tree

4 files changed

+458
-351
lines changed

4 files changed

+458
-351
lines changed

Doc/c-api/monitoring.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. highlight:: c
22

3-
.. _monitoring:
3+
.. _c-api-monitoring:
44

55
Monitoring C API
66
================
@@ -141,18 +141,18 @@ would typically correspond to a python function.
141141
to the base-2 logarithm of ``sys.monitoring.events.PY_START``.
142142
``state_array`` is an array with a monitoring state entry for each event in
143143
``event_types``, it is allocated by the user but populated by
144-
``PyMonitoring_EnterScope`` with information about the activation state of
144+
:c:func:`!PyMonitoring_EnterScope` with information about the activation state of
145145
the event. The size of ``event_types`` (and hence also of ``state_array``)
146146
is given in ``length``.
147147
148148
The ``version`` argument is a pointer to a value which should be allocated
149149
by the user together with ``state_array`` and initialized to 0,
150-
and then set only by ``PyMonitoring_EnterScope`` itelf. It allows this
150+
and then set only by :c:func:`!PyMonitoring_EnterScope` itelf. It allows this
151151
function to determine whether event states have changed since the previous call,
152152
and to return quickly if they have not.
153153
154154
The scopes referred to here are lexical scopes: a function, class or method.
155-
``PyMonitoring_EnterScope`` should be called whenever the lexical scope is
155+
:c:func:`!PyMonitoring_EnterScope` should be called whenever the lexical scope is
156156
entered. Scopes can be reentered, reusing the same *state_array* and *version*,
157157
in situations like when emulating a recursive Python function. When a code-like's
158158
execution is paused, such as when emulating a generator, the scope needs to
@@ -161,4 +161,4 @@ would typically correspond to a python function.
161161
162162
.. :c:function:: int PyMonitoring_ExitScope(void)
163163
164-
Exit the last scope that was entered with ``PyMonitoring_EnterScope``.
164+
Exit the last scope that was entered with :c:func:`!PyMonitoring_EnterScope`.

Doc/c-api/time.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.. highlight:: c
22

3+
.. _c-api-time:
4+
35
PyTime C API
46
============
57

Doc/library/sys.monitoring.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ Per code object events
258258
Events can also be controlled on a per code object basis. The functions
259259
defined below which accept a :class:`types.CodeType` should be prepared
260260
to accept a look-alike object from functions which are not defined
261-
in Python (see :ref:`monitoring`).
261+
in Python (see :ref:`c-api-monitoring`).
262262

263263
.. function:: get_local_events(tool_id: int, code: CodeType, /) -> int
264264

0 commit comments

Comments
 (0)