diff options
author | Ryan Lortie <desrt@desrt.ca> | 2014-04-16 18:05:07 -0400 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2014-05-06 08:18:41 -0400 |
commit | 17b19cfcad236fd2def64b9aac454ecb3cd42e8d (patch) | |
tree | 3538405d943fbb4dc81191a61fcc497f20c2ed39 /giscanner/girwriter.py | |
parent | 1459ff3eb242327fca8a2b5a696b14b7e46afdee (diff) | |
download | gobject-introspection-17b19cfcad236fd2def64b9aac454ecb3cd42e8d.tar.gz |
giscanner: support nullable return types too
Promote the 'nullable' field to the TypeContainer base class (which is
shared by Return and Parameter types).
Add .gir support for nullability on return values, both in the writer
and in the (scanner's) parser.
https://bugzilla.gnome.org/show_bug.cgi?id=660879
Diffstat (limited to 'giscanner/girwriter.py')
-rw-r--r-- | giscanner/girwriter.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/giscanner/girwriter.py b/giscanner/girwriter.py index 49545e62..3bea2a1c 100644 --- a/giscanner/girwriter.py +++ b/giscanner/girwriter.py @@ -215,6 +215,8 @@ class GIRWriter(XMLWriter): attrs.append(('transfer-ownership', return_.transfer)) if return_.skip: attrs.append(('skip', '1')) + if return_.nullable: + attrs.append(('nullable', '1')) with self.tagcontext('return-value', attrs): self._write_generic(return_) self._write_type(return_.type, parent=parent) |