Skip to content

Commit 9d0a752

Browse files
authored
GH-109975: Copyedit 3.13 What's New: C API (#124313)
1 parent 5f5c0b9 commit 9d0a752

File tree

4 files changed

+457
-354
lines changed

4 files changed

+457
-354
lines changed

Doc/c-api/monitoring.rst

+5-5
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
@@ -189,4 +189,4 @@ would typically correspond to a python function.
189189
190190
.. c:function:: int PyMonitoring_ExitScope(void)
191191
192-
Exit the last scope that was entered with ``PyMonitoring_EnterScope``.
192+
Exit the last scope that was entered with :c:func:`!PyMonitoring_EnterScope`.

Doc/c-api/time.rst

+2
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ Per code object events
262262
Events can also be controlled on a per code object basis. The functions
263263
defined below which accept a :class:`types.CodeType` should be prepared
264264
to accept a look-alike object from functions which are not defined
265-
in Python (see :ref:`monitoring`).
265+
in Python (see :ref:`c-api-monitoring`).
266266

267267
.. function:: get_local_events(tool_id: int, code: CodeType, /) -> int
268268

0 commit comments

Comments
 (0)