From 4a7acc4a21044c5feff525f5fb8074152d670a4c Mon Sep 17 00:00:00 2001 From: arvidn Date: Mon, 2 Dec 2019 12:49:40 +0100 Subject: [PATCH] strip TORRENT_COUNTER_NOEXCEPT when generating documentation --- docs/gen_reference_doc.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/gen_reference_doc.py b/docs/gen_reference_doc.py index ed22c428b..6d2af967c 100644 --- a/docs/gen_reference_doc.py +++ b/docs/gen_reference_doc.py @@ -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: