diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-01-06 10:41:02 +0000 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-05-02 09:02:37 +0100 |
commit | c0b13f7ccc26e78cd81dfbba6bfe20d806ef9cc7 (patch) | |
tree | 77ed3d4a681aa42f41c04f0ed2d75341cbffd1fa /tools | |
parent | 5df746489af48d364defcf03bc57a980f1d65964 (diff) | |
download | telepathy-glib-c0b13f7ccc26e78cd81dfbba6bfe20d806ef9cc7.tar.gz |
glib-client-gen.py: try to add the enum type when documenting guint args
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/glib-client-gen.py | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/tools/glib-client-gen.py b/tools/glib-client-gen.py index 6b0bdeba1..57d6df313 100644 --- a/tools/glib-client-gen.py +++ b/tools/glib-client-gen.py @@ -139,8 +139,12 @@ class Generator(object): name, info, tp_type, elt = arg ctype, gtype, marshaller, pointer = info - self.d(' * @%s: %s' % (name, - xml_escape(get_docstring(elt) or '(Undocumented)'))) + docs = get_docstring(elt) or '(Undocumented)' + + if ctype == 'guint ' and tp_type != '': + docs += ' (#%s)' % ('Tp' + tp_type.replace('_', '')) + + self.d(' * @%s: %s' % (name, xml_escape(docs))) self.d(' * @user_data: User-supplied data') self.d(' * @weak_object: User-supplied weakly referenced object') @@ -432,9 +436,14 @@ class Generator(object): name, info, tp_type, elt = arg ctype, gtype, marshaller, pointer = info + docs = xml_escape(get_docstring(elt) or '(Undocumented)') + + if ctype == 'guint ' and tp_type != '': + docs += ' (#%s)' % ('Tp' + tp_type.replace('_', '')) + self.d(' * @%s: Used to return an \'out\' argument if @error is ' '%%NULL: %s' - % (name, xml_escape(get_docstring(elt) or '(Undocumented)'))) + % (name, docs)) self.d(' * @error: %NULL on success, or an error on failure') self.d(' * @user_data: user-supplied data') @@ -687,8 +696,13 @@ class Generator(object): name, info, tp_type, elt = arg ctype, gtype, marshaller, pointer = info + docs = xml_escape(get_docstring(elt) or '(Undocumented)') + + if ctype == 'guint ' and tp_type != '': + docs += ' (#%s)' % ('Tp' + tp_type.replace('_', '')) + self.d(' * @%s: Used to pass an \'in\' argument: %s' - % (name, xml_escape(get_docstring(elt) or '(Undocumented)'))) + % (name, docs)) self.d(' * @callback: called when the method call succeeds or fails;') self.d(' * may be %NULL to make a "fire and forget" call with no ') @@ -943,8 +957,13 @@ class Generator(object): name, info, tp_type, elt = arg ctype, gtype, marshaller, pointer = info + docs = xml_escape(get_docstring(elt) or '(Undocumented)') + + if ctype == 'guint ' and tp_type != '': + docs += ' (#%s)' % ('Tp' + tp_type.replace('_', '')) + self.d(' * @%s: Used to pass an \'in\' argument: %s' - % (name, xml_escape(get_docstring(elt) or '(Undocumented)'))) + % (name, docs)) for arg in out_args: name, info, tp_type, elt = arg |