GH-91052: Add C API for watching dictionaries (GH-31787)

This commit is contained in:
Carl Meyer 2022-10-06 17:08:00 -07:00 committed by GitHub
parent 683ab85955
commit a4b7794887
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 487 additions and 17 deletions

View file

@ -451,6 +451,10 @@ interpreter_clear(PyInterpreterState *interp, PyThreadState *tstate)
Py_CLEAR(interp->sysdict);
Py_CLEAR(interp->builtins);
for (int i=0; i < DICT_MAX_WATCHERS; i++) {
interp->dict_watchers[i] = NULL;
}
// 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.