diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2014-06-20 13:52:14 +0100 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2015-10-04 17:46:09 -0400 |
commit | 10cb665fee2cc378dd2f13bad16e6384836a8b16 (patch) | |
tree | 3d699aa40290c4902774233290ec89d277ff9dec /giscanner/girparser.py | |
parent | 0a134a608f5b471c3a12739785e149ceaf90df27 (diff) | |
download | gobject-introspection-10cb665fee2cc378dd2f13bad16e6384836a8b16.tar.gz |
giscanner: Mark gpointer nodes as nullable by default
gpointer parameters and return types should be marked as nullable by
default, unless:
• also annotated with (type) and not with (nullable); or
• explicitly annotated with (not nullable).
This introduces the (not nullable) annotation as a direct opposite to
(nullable). In future, (not) could be extended to invert other
annotations.
https://bugzilla.gnome.org/show_bug.cgi?id=729660
Diffstat (limited to 'giscanner/girparser.py')
-rw-r--r-- | giscanner/girparser.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/giscanner/girparser.py b/giscanner/girparser.py index 57f3e908..909e08d9 100644 --- a/giscanner/girparser.py +++ b/giscanner/girparser.py @@ -318,7 +318,7 @@ class GIRParser(object): raise ValueError('node %r has no return-value' % (name, )) transfer = returnnode.attrib.get('transfer-ownership') nullable = returnnode.attrib.get('nullable') == '1' - retval = ast.Return(self._parse_type(returnnode), nullable, transfer) + retval = ast.Return(self._parse_type(returnnode), nullable, False, transfer) self._parse_generic_attribs(returnnode, retval) parameters = [] |