Commits

Armin Rigo committed 4b82ae9

Use quasi-immutable fields here.

Comments (0)

Files changed (2)

pypy/module/_cffi_backend/ctypeobj.py

 
 
 class W_CType(Wrappable):
-    _attrs_ = ['space', 'size', 'name', 'name_position']
+    _attrs_ = ['space', 'size?', 'name', 'name_position']
     _immutable_fields_ = _attrs_
 
     cast_anything = False

pypy/module/_cffi_backend/ctypestruct.py

 
 
 class W_CTypeStructOrUnion(W_CType):
-    # not an _immutable_ class!
+    _attrs_ = ['alignment?', 'fields_list?', 'fields_dict?',
+               'custom_field_pos?']
     # fields added by complete_struct_or_union():
     alignment = -1
     fields_list = None