We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c7f814 commit 6e5cee2Copy full SHA for 6e5cee2
Objects/dictobject.c
@@ -5765,11 +5765,12 @@ _PyDict_SendEvent(int watcher_bits,
5765
{
5766
PyInterpreterState *interp = _PyInterpreterState_GET();
5767
for (int i = 0; i < DICT_MAX_WATCHERS; i++) {
5768
- if (watcher_bits & (1 << i)) {
+ if (watcher_bits & 1) {
5769
PyDict_WatchCallback cb = (PyDict_WatchCallback)interp->dict_watchers[i];
5770
if (cb) {
5771
cb(event, (PyObject*)mp, key, value);
5772
}
5773
5774
+ watcher_bits >>= 1;
5775
5776
0 commit comments