strip TORRENT_COUNTER_NOEXCEPT when generating documentation

This commit is contained in:
arvidn 2019-12-02 12:49:40 +01:00 committed by Arvid Norberg
parent 7b0bb2fb0b
commit 4a7acc4a21
1 changed files with 6 additions and 2 deletions

View File

@ -298,7 +298,9 @@ def parse_function(lno, lines, filename):
start_paren += line.count('(')
end_paren += line.count(')')
sig_line = line.replace('TORRENT_EXPORT ', '').replace('TORRENT_EXTRA_EXPORT', '').strip()
sig_line = line.replace('TORRENT_EXPORT ', '') \
.replace('TORRENT_EXTRA_EXPORT', '') \
.replace('TORRENT_COUNTER_NOEXCEPT', '').strip()
if signature != '':
sig_line = '\n ' + sig_line
signature += sig_line
@ -351,7 +353,9 @@ def parse_class(lno, lines, filename):
while lno < len(lines):
line = lines[lno].strip()
decl += lines[lno].replace('TORRENT_EXPORT ', '').replace('TORRENT_EXTRA_EXPORT', '').split('{')[0].strip()
decl += lines[lno].replace('TORRENT_EXPORT ', '') \
.replace('TORRENT_EXTRA_EXPORT', '') \
.replace('TORRENT_COUNTER_NOEXCEPT', '').split('{')[0].strip()
if '{' in line:
break
if verbose: