diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 2a9ef71b548..6200a830c0a 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -926,7 +926,7 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds) mp->name = "__weakref__"; mp->type = T_OBJECT; mp->offset = slotoffset; - mp->readonly = 1; + mp->flags = READONLY; mp++; slotoffset += sizeof(PyObject *); }