mirror of
https://github.com/python/cpython.git
synced 2025-10-03 05:35:59 +00:00
Fix ctypes
typo in set_exception
(#101040)
This commit is contained in:
parent
f6307d4416
commit
5e9df888dd
2 changed files with 3 additions and 3 deletions
|
@ -1656,12 +1656,12 @@ They are instances of a private class:
|
||||||
passed arguments.
|
passed arguments.
|
||||||
|
|
||||||
|
|
||||||
.. audit-event:: ctypes.seh_exception code foreign-functions
|
.. audit-event:: ctypes.set_exception code foreign-functions
|
||||||
|
|
||||||
On Windows, when a foreign function call raises a system exception (for
|
On Windows, when a foreign function call raises a system exception (for
|
||||||
example, due to an access violation), it will be captured and replaced with
|
example, due to an access violation), it will be captured and replaced with
|
||||||
a suitable Python exception. Further, an auditing event
|
a suitable Python exception. Further, an auditing event
|
||||||
``ctypes.seh_exception`` with argument ``code`` will be raised, allowing an
|
``ctypes.set_exception`` with argument ``code`` will be raised, allowing an
|
||||||
audit hook to replace the exception with its own.
|
audit hook to replace the exception with its own.
|
||||||
|
|
||||||
.. audit-event:: ctypes.call_function func_pointer,arguments foreign-functions
|
.. audit-event:: ctypes.call_function func_pointer,arguments foreign-functions
|
||||||
|
|
|
@ -286,7 +286,7 @@ static WCHAR *FormatError(DWORD code)
|
||||||
#ifndef DONT_USE_SEH
|
#ifndef DONT_USE_SEH
|
||||||
static void SetException(DWORD code, EXCEPTION_RECORD *pr)
|
static void SetException(DWORD code, EXCEPTION_RECORD *pr)
|
||||||
{
|
{
|
||||||
if (PySys_Audit("ctypes.seh_exception", "I", code) < 0) {
|
if (PySys_Audit("ctypes.set_exception", "I", code) < 0) {
|
||||||
/* An exception was set by the audit hook */
|
/* An exception was set by the audit hook */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue