gh-148398: add type watcher in _CHECK_ATTR_CLASS (GH-148399)

This commit is contained in:
Neko Asakura 2026-04-12 08:54:03 -04:00 committed by GitHub
parent 3a7df632c9
commit 30c698a655
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 0 deletions

View file

@ -226,6 +226,10 @@ dummy_func(void) {
}
else {
sym_set_const(owner, type);
if ((((PyTypeObject *)type)->tp_flags & Py_TPFLAGS_IMMUTABLETYPE) == 0) {
PyType_Watch(TYPE_WATCHER_ID, type);
_Py_BloomFilter_Add(dependencies, type);
}
}
}
}

View file

@ -2571,6 +2571,10 @@
}
else {
sym_set_const(owner, type);
if ((((PyTypeObject *)type)->tp_flags & Py_TPFLAGS_IMMUTABLETYPE) == 0) {
PyType_Watch(TYPE_WATCHER_ID, type);
_Py_BloomFilter_Add(dependencies, type);
}
}
}
break;