GH-115775: Use __static_attributes__ to initialize shared keys (GH-118468)

This commit is contained in:
Mark Shannon 2024-08-27 10:34:46 +01:00 committed by GitHub
parent fe85a8291d
commit 89328f7b12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 3 deletions

View file

@ -8334,7 +8334,7 @@ type_ready_managed_dict(PyTypeObject *type)
}
PyHeapTypeObject* et = (PyHeapTypeObject*)type;
if (et->ht_cached_keys == NULL) {
et->ht_cached_keys = _PyDict_NewKeysForClass();
et->ht_cached_keys = _PyDict_NewKeysForClass(et);
if (et->ht_cached_keys == NULL) {
PyErr_NoMemory();
return -1;