diff options
author | Itamar Ostricher <itamarost@gmail.com> | 2022-12-14 19:14:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-14 19:14:16 (GMT) |
commit | ae83c782155ffe86830c3255e338f366e331ad30 (patch) | |
tree | 353db1dc5287520c07b951467461deb8a10a84c4 /Python | |
parent | aa8591e9ca9a3e55e96a03c17fa9d3902f0674dc (diff) | |
download | cpython-ae83c782155ffe86830c3255e338f366e331ad30.zip cpython-ae83c782155ffe86830c3255e338f366e331ad30.tar.gz cpython-ae83c782155ffe86830c3255e338f366e331ad30.tar.bz2 |
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
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pystate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index ea3c22c..f52fc38 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -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; } |