diff options
author | David Zeuthen <davidz@redhat.com> | 2010-06-15 11:01:37 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2010-06-24 11:53:18 -0400 |
commit | 11cfe386c37ced44a8e3efb5556bde3a43a11171 (patch) | |
tree | a01903a4e4596ca80c79abbc8d35c33dc665e526 /giscanner/girwriter.py | |
parent | 751ffa016e410a031028282e63f98a94cc444b7b (diff) | |
download | gobject-introspection-11cfe386c37ced44a8e3efb5556bde3a43a11171.tar.gz |
Allow attributes on parameters and return values
Any annotation where the key has a dot in the name will go into the
attribute list. For example
* @arg: (foo.bar baz): some arg
the parameter @arg will get the attribute with key foo.bar and value
baz. This also works for.
* Returns: (foo.bar2 baz2): the return value
Also add tests for this new feature.
See https://bugzilla.gnome.org/show_bug.cgi?id=571548
Signed-off-by: David Zeuthen <davidz@redhat.com>
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 9b48d4ef..59b4b495 100644 --- a/giscanner/girwriter.py +++ b/giscanner/girwriter.py @@ -192,6 +192,7 @@ and/or use gtk-doc annotations. ''') if return_.doc: attrs.append(('doc', return_.doc)) with self.tagcontext('return-value', attrs): + self._write_attributes(return_) self._write_type(return_.type) def _write_parameters(self, parameters): @@ -224,6 +225,7 @@ and/or use gtk-doc annotations. ''') if parameter.doc: attrs.append(('doc', parameter.doc)) with self.tagcontext('parameter', attrs): + self._write_attributes(parameter) self._write_type(parameter.type) def _type_to_string(self, ntype): |