From c73cf4572790790aa6070f35fe1635f20cfa79c1 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Thu, 7 Sep 2017 19:47:30 -0700 Subject: [PATCH] PEP 551: Add userdata parameter to C API (#397) Remove recursion limit and switch interval hooks --- pep-0551.rst | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pep-0551.rst b/pep-0551.rst index 7a42cd82a..b40a3f344 100644 --- a/pep-0551.rst +++ b/pep-0551.rst @@ -196,8 +196,9 @@ such as ``ctypes``. The new C APIs required for audit hooks are:: # Add an auditing hook - typedef int (*hook_func)(const char *event, PyObject *args); - int PySys_AddAuditHook(hook_func hook); + typedef int (*hook_func)(const char *event, PyObject *args, + void *userData); + int PySys_AddAuditHook(hook_func hook, void *userData); # Raise an event with all auditing hooks int PySys_Audit(const char *event, PyObject *args); @@ -433,12 +434,6 @@ should be considered part of the rationale for including the hook. ``_PyEval_SetCoroutineWrapper``, ``sys.set_coroutine_wrapper``, " ", "Detect changes to the coroutine wrapper. " - ``Py_SetRecursionLimit``, ``sys.setrecursionlimit``, " - ``(new_limit,)``", "Detect changes to the recursion limit. - " - ``_PyEval_SetSwitchInterval``, ``sys.setswitchinterval``, " - ``(interval_us,)``", "Detect changes to the switching interval. - " "``socket.bind``, ``socket.connect``, ``socket.connect_ex``, ``socket.getaddrinfo``, ``socket.getnameinfo``, ``socket.sendmsg``, ``socket.sendto``", ``socket.address``, "``(address,)``", "Detect