Skip to content

[3.13] GH-109975: Copyedit 3.13 What's New: C API (GH-124313) #124334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
gh-118915: Add/fix docs entries for some new 3.13 C API (GH-124134)
  • Loading branch information
encukou authored and AA-Turner committed Sep 23, 2024
commit 84fdad16aa01c4c31f3527274f67b993303a5d88
34 changes: 31 additions & 3 deletions Doc/c-api/monitoring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Managing the Monitoring State
Monitoring states can be managed with the help of monitoring scopes. A scope
would typically correspond to a python function.

.. :c:function:: int PyMonitoring_EnterScope(PyMonitoringState *state_array, uint64_t *version, const uint8_t *event_types, Py_ssize_t length)
.. c:function:: int PyMonitoring_EnterScope(PyMonitoringState *state_array, uint64_t *version, const uint8_t *event_types, Py_ssize_t length)

Enter a monitored scope. ``event_types`` is an array of the event IDs for
events that may be fired from the scope. For example, the ID of a ``PY_START``
Expand All @@ -158,7 +158,35 @@ would typically correspond to a python function.
execution is paused, such as when emulating a generator, the scope needs to
be exited and re-entered.


.. :c:function:: int PyMonitoring_ExitScope(void)
The macros for *event_types* are:

.. c:namespace:: NULL

.. The table is here to make the docs searchable, and to allow automatic
links to the identifiers.

================================================== =====================================
Macro Event
================================================== =====================================
.. c:macro:: PY_MONITORING_EVENT_BRANCH :monitoring-event:`BRANCH`
.. c:macro:: PY_MONITORING_EVENT_CALL :monitoring-event:`CALL`
.. c:macro:: PY_MONITORING_EVENT_C_RAISE :monitoring-event:`C_RAISE`
.. c:macro:: PY_MONITORING_EVENT_C_RETURN :monitoring-event:`C_RETURN`
.. c:macro:: PY_MONITORING_EVENT_EXCEPTION_HANDLED :monitoring-event:`EXCEPTION_HANDLED`
.. c:macro:: PY_MONITORING_EVENT_INSTRUCTION :monitoring-event:`INSTRUCTION`
.. c:macro:: PY_MONITORING_EVENT_JUMP :monitoring-event:`JUMP`
.. c:macro:: PY_MONITORING_EVENT_LINE :monitoring-event:`LINE`
.. c:macro:: PY_MONITORING_EVENT_PY_RESUME :monitoring-event:`PY_RESUME`
.. c:macro:: PY_MONITORING_EVENT_PY_RETURN :monitoring-event:`PY_RETURN`
.. c:macro:: PY_MONITORING_EVENT_PY_START :monitoring-event:`PY_START`
.. c:macro:: PY_MONITORING_EVENT_PY_THROW :monitoring-event:`PY_THROW`
.. c:macro:: PY_MONITORING_EVENT_PY_UNWIND :monitoring-event:`PY_UNWIND`
.. c:macro:: PY_MONITORING_EVENT_PY_YIELD :monitoring-event:`PY_YIELD`
.. c:macro:: PY_MONITORING_EVENT_RAISE :monitoring-event:`RAISE`
.. c:macro:: PY_MONITORING_EVENT_RERAISE :monitoring-event:`RERAISE`
.. c:macro:: PY_MONITORING_EVENT_STOP_ITERATION :monitoring-event:`STOP_ITERATION`
================================================== =====================================

.. c:function:: int PyMonitoring_ExitScope(void)

Exit the last scope that was entered with :c:func:`!PyMonitoring_EnterScope`.
1 change: 1 addition & 0 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
('c:type', 'size_t'),
('c:type', 'ssize_t'),
('c:type', 'time_t'),
('c:type', 'uint8_t'),
('c:type', 'uint64_t'),
('c:type', 'uintmax_t'),
('c:type', 'uintptr_t'),
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy