Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-101100: Clean up Doc/c-api/exceptions.rst and Doc/c-api/sys.rst#114825

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
serhiy-storchaka merged 11 commits intopython:mainfromsmontanaro:doc-capi
Feb 11, 2024
Merged
Changes from1 commit
Commits
Show all changes
11 commits
Select commitHold shift + click to select a range
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
PrevPrevious commit
NextNext commit
maybe this is better
  • Loading branch information
@smontanaro
smontanaro committedFeb 9, 2024
commitbf7297c7d149cfa32a3e890db8024b2fad0d3aac
20 changes: 11 additions & 9 deletionsDoc/c-api/sys.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -329,6 +329,15 @@ accessible to C code. They all work with the current interpreter thread's
.. versionadded:: 3.13


.. c:namespace:: NULL
.. c:type:: int (*Py_AuditHookFunction) (const char *event, PyObject *args, void *userData)

The type of the hook function.
*event* is the C string event argument passed to :c:func:`PySys_Audit` or
:c:func:`PySys_AuditTuple`.
*args* is guaranteed to be a :c:type:`PyTupleObject`.
*userData* is the argument passed to PySys_AddAuditHook().

.. c:function:: int PySys_AddAuditHook(Py_AuditHookFunction hook, void *userData)

Append the callable *hook* to the list of active auditing hooks.
Expand All@@ -346,15 +355,8 @@ accessible to C code. They all work with the current interpreter thread's
silently abort the operation by raising an error subclassed from
:class:`Exception` (other errors will not be silenced).

.. c:namespace:: NULL
.. c:type:: int (*Py_AuditHookFunction) (const char *event, PyObject *args, void *userData)

The type of the hook function.
*event* is (the event argument passed to PySys_Audit() or PySys_AuditTuple()),
*args* is guaranteed to be a :c:type:`PyTupleObject`. The hook
function is always called with the GIL held by the Python
interpreter that raised the event.
*userData* is the argument passed to PySys_AddAuditHook().
The hook function is always called with the GIL held by the Python
interpreter that raised the event.

See :pep:`578` for a detailed description of auditing. Functions in the
runtime and standard library that raise events are listed in the
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp