summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index f58960d..5a41387 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -2472,6 +2472,9 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds)
type->tp_dictoffset = slotoffset;
slotoffset += sizeof(PyObject *);
}
+ else if (!type->tp_dictoffset) {
+ type->tp_dictoffset = base->tp_dictoffset;
+ }
if (type->tp_dictoffset) {
et->ht_cached_keys = _PyDict_NewKeysForClass();
}