mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-42064: Pass module state to trace, progress, and authorizer callbacks (GH-27940)
- add print-or-clear traceback helper - add helpers to clear and visit saved contexts - modify callbacks to use the new callback_context struct
This commit is contained in:
parent
8ca6b61e3f
commit
979336de34
2 changed files with 111 additions and 73 deletions
|
|
@ -82,10 +82,10 @@ typedef struct
|
|||
*/
|
||||
PyObject* text_factory;
|
||||
|
||||
/* remember references to object used in trace_callback/progress_handler/authorizer_cb */
|
||||
PyObject* function_pinboard_trace_callback;
|
||||
PyObject* function_pinboard_progress_handler;
|
||||
PyObject* function_pinboard_authorizer_cb;
|
||||
// Remember contexts used by the trace, progress, and authoriser callbacks
|
||||
callback_context *trace_ctx;
|
||||
callback_context *progress_ctx;
|
||||
callback_context *authorizer_ctx;
|
||||
|
||||
/* Exception objects: borrowed refs. */
|
||||
PyObject* Warning;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue