diff options
author | Adam Turner <9087854+AA-Turner@users.noreply.github.com> | 2024-09-23 13:28:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-23 13:28:17 (GMT) |
commit | 9d0a75269c6ae361b1ed5910c3b3424ed93b6f6d (patch) | |
tree | 4f6a9869961ead980902ba3df061f984022e51e8 /Doc/c-api | |
parent | 5f5c0b9c23238dc0a1fdb764f625ae0cc5604519 (diff) | |
download | cpython-9d0a75269c6ae361b1ed5910c3b3424ed93b6f6d.zip cpython-9d0a75269c6ae361b1ed5910c3b3424ed93b6f6d.tar.gz cpython-9d0a75269c6ae361b1ed5910c3b3424ed93b6f6d.tar.bz2 |
GH-109975: Copyedit 3.13 What's New: C API (#124313)
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/monitoring.rst | 10 | ||||
-rw-r--r-- | Doc/c-api/time.rst | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/Doc/c-api/monitoring.rst b/Doc/c-api/monitoring.rst index 4db26d8..285ddb2 100644 --- a/Doc/c-api/monitoring.rst +++ b/Doc/c-api/monitoring.rst @@ -1,6 +1,6 @@ .. highlight:: c -.. _monitoring: +.. _c-api-monitoring: Monitoring C API ================ @@ -141,18 +141,18 @@ would typically correspond to a python function. to the base-2 logarithm of ``sys.monitoring.events.PY_START``. ``state_array`` is an array with a monitoring state entry for each event in ``event_types``, it is allocated by the user but populated by - ``PyMonitoring_EnterScope`` with information about the activation state of + :c:func:`!PyMonitoring_EnterScope` with information about the activation state of the event. The size of ``event_types`` (and hence also of ``state_array``) is given in ``length``. The ``version`` argument is a pointer to a value which should be allocated by the user together with ``state_array`` and initialized to 0, - and then set only by ``PyMonitoring_EnterScope`` itelf. It allows this + and then set only by :c:func:`!PyMonitoring_EnterScope` itelf. It allows this function to determine whether event states have changed since the previous call, and to return quickly if they have not. The scopes referred to here are lexical scopes: a function, class or method. - ``PyMonitoring_EnterScope`` should be called whenever the lexical scope is + :c:func:`!PyMonitoring_EnterScope` should be called whenever the lexical scope is entered. Scopes can be reentered, reusing the same *state_array* and *version*, in situations like when emulating a recursive Python function. When a code-like's execution is paused, such as when emulating a generator, the scope needs to @@ -189,4 +189,4 @@ would typically correspond to a python function. .. c:function:: int PyMonitoring_ExitScope(void) - Exit the last scope that was entered with ``PyMonitoring_EnterScope``. + Exit the last scope that was entered with :c:func:`!PyMonitoring_EnterScope`. diff --git a/Doc/c-api/time.rst b/Doc/c-api/time.rst index 5cfdef7..7032cc4 100644 --- a/Doc/c-api/time.rst +++ b/Doc/c-api/time.rst @@ -1,5 +1,7 @@ .. highlight:: c +.. _c-api-time: + PyTime C API ============ |