diff options
author | Tommi Komulainen <tommi.komulainen@iki.fi> | 2008-10-17 14:58:37 +0000 |
---|---|---|
committer | Tommi Komulainen <tko@src.gnome.org> | 2008-10-17 14:58:37 +0000 |
commit | caf97d582f8f4a8653d8a4dc06524dd448bf5e26 (patch) | |
tree | 2668b6fa7c9e14f86c797c67afe5178129b51d2a /giscanner/girparser.py | |
parent | 2b1b2ccf3e29c26a50bcaac876b16d0c5c2d4df3 (diff) | |
download | gobject-introspection-caf97d582f8f4a8653d8a4dc06524dd448bf5e26.tar.gz |
Bug 556732 – generate gir files consistently
2008-10-17 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 556732 – generate gir files consistently
* giscanner/ast.py (Field): add readable and writable properties
* giscanner/girparser.py (_parse_field): copy 'readable' and
'writable' attributes
* giscanner/transformer.py (_create_member): create fields as
read-write
* giscanner/glibtransformer.py (_introspect_object,
_pair_class_struct): make object instance and class fields
read-only
* giscanner/girwriter.py (_write_field):
* tools/generate.c (write_field_info): write field 'readable'
and 'writable' attributes only if non-default (read-only)
* girepository/girparser.c (start_field): in the absence of
attributes assume fields are read-only
* tests/boxed.gir:
* tests/struct.gir: remove redundant readable="1" from fields
* tests/scanner/foo-1.0-expected.gir:
* tests/scanner/utility-1.0-expected.gir: add writable="1" to
all record and union fields
svn path=/trunk/; revision=743
Diffstat (limited to 'giscanner/girparser.py')
-rw-r--r-- | giscanner/girparser.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/giscanner/girparser.py b/giscanner/girparser.py index 933bb97d..0a9e5793 100644 --- a/giscanner/girparser.py +++ b/giscanner/girparser.py @@ -245,6 +245,8 @@ class GIRParser(object): return Field(node.attrib['name'], type_node, type_node.ctype, + node.attrib.get('readable') != '0', + node.attrib.get('writable') == '1', node.attrib.get('bits')) def _parse_property(self, node): |