From a67c3be47d1af396f4ad1eb7e770fb3be4d58334 Mon Sep 17 00:00:00 2001 From: Dan White Date: Wed, 31 Oct 2012 21:46:53 -0500 Subject: [PATCH] Tweak doxy2swig.py output to include Returns header Underlines are proportional to the title now also. --- bindings/doxy2swig.py | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bindings/doxy2swig.py b/bindings/doxy2swig.py index 96573dc..c6c972c 100644 --- a/bindings/doxy2swig.py +++ b/bindings/doxy2swig.py @@ -237,6 +237,7 @@ class Doxy2SWIG: if key == 'kind': if val == 'param': text = 'Parameters' elif val == 'exception': text = 'Exceptions' + elif val == 'retval': text = 'Returns' else: text = val break self.add_text(['\n', '\n', text, ':', '\n']) @@ -410,8 +411,8 @@ class Doxy2SWIG: _data = "".join(ret) ret = [] for i in _data.split('\n\n'): - if i == 'Parameters:' or i == 'Exceptions:': - ret.extend([i, '\n-----------', '\n\n']) + if i == 'Parameters:' or i == 'Exceptions:' or i == 'Returns:': + ret.extend([i, '\n'+'-'*len(i), '\n\n']) elif i.find('// File:') > -1: # leave comments alone. ret.extend([i, '\n']) else: -- 1.7.1