mirror of
https://github.com/python/cpython.git
synced 2025-07-17 08:15:19 +00:00
GH-100000: Cleanup and polish various watchers code (GH-99998)
* Initialize `type_watchers` array to `NULL`s * Optimize code watchers notification * Optimize func watchers notification
This commit is contained in:
parent
aa8591e9ca
commit
ae83c78215
6 changed files with 37 additions and 14 deletions
|
@ -461,6 +461,10 @@ interpreter_clear(PyInterpreterState *interp, PyThreadState *tstate)
|
|||
interp->dict_state.watchers[i] = NULL;
|
||||
}
|
||||
|
||||
for (int i=0; i < TYPE_MAX_WATCHERS; i++) {
|
||||
interp->type_watchers[i] = NULL;
|
||||
}
|
||||
|
||||
for (int i=0; i < FUNC_MAX_WATCHERS; i++) {
|
||||
interp->func_watchers[i] = NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue