Author: Armin Rigo <[email protected]>
Branch: ffi-backend
Changeset: r56498:4b82ae9bf23d
Date: 2012-07-28 19:13 +0200
http://bitbucket.org/pypy/pypy/changeset/4b82ae9bf23d/
Log: Use quasi-immutable fields here.
diff --git a/pypy/module/_cffi_backend/ctypeobj.py
b/pypy/module/_cffi_backend/ctypeobj.py
--- a/pypy/module/_cffi_backend/ctypeobj.py
+++ b/pypy/module/_cffi_backend/ctypeobj.py
@@ -10,7 +10,7 @@
class W_CType(Wrappable):
- _attrs_ = ['space', 'size', 'name', 'name_position']
+ _attrs_ = ['space', 'size?', 'name', 'name_position']
_immutable_fields_ = _attrs_
cast_anything = False
diff --git a/pypy/module/_cffi_backend/ctypestruct.py
b/pypy/module/_cffi_backend/ctypestruct.py
--- a/pypy/module/_cffi_backend/ctypestruct.py
+++ b/pypy/module/_cffi_backend/ctypestruct.py
@@ -14,7 +14,8 @@
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
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit