mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
gh-91053: Add an optional callback that is invoked whenever a function is modified (#98175)
This commit is contained in:
parent
20d9749a0f
commit
3db0a21f73
9 changed files with 524 additions and 0 deletions
|
@ -461,6 +461,11 @@ interpreter_clear(PyInterpreterState *interp, PyThreadState *tstate)
|
|||
interp->dict_state.watchers[i] = NULL;
|
||||
}
|
||||
|
||||
for (int i=0; i < FUNC_MAX_WATCHERS; i++) {
|
||||
interp->func_watchers[i] = NULL;
|
||||
}
|
||||
interp->active_func_watchers = 0;
|
||||
|
||||
// XXX Once we have one allocator per interpreter (i.e.
|
||||
// per-interpreter GC) we must ensure that all of the interpreter's
|
||||
// objects have been cleaned up at the point.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue