mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
GH-91054: Add code object watchers API (GH-99859)
* Add API to allow extensions to set callback function on creation and destruction of PyCodeObject Co-authored-by: Ye11ow-Flash <janshah@cs.stonybrook.edu>
This commit is contained in:
parent
0563be23a5
commit
3c137dc613
11 changed files with 364 additions and 0 deletions
|
@ -466,6 +466,11 @@ interpreter_clear(PyInterpreterState *interp, PyThreadState *tstate)
|
|||
}
|
||||
interp->active_func_watchers = 0;
|
||||
|
||||
for (int i=0; i < CODE_MAX_WATCHERS; i++) {
|
||||
interp->code_watchers[i] = NULL;
|
||||
}
|
||||
interp->active_code_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