From 020f5190955808cafb670d2be6afb7d5faf69621 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Thu, 16 Jan 2020 21:41:34 +0530 Subject: vcs-to-changelog: Fix parsing of fndecl without args. * build-aux/vcstocl/frontend_c.py (FNDECL_RE): Fix regular expression for empty arguments. --- ChangeLog | 6 ++++++ build-aux/vcstocl/frontend_c.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 560765244e..643dba312c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-01-16 Siddhesh Poyarekar + + vcs-to-changelog: Fix parsing of fndecl without args. + * build-aux/vcstocl/frontend_c.py (FNDECL_RE): Fix regular expression + for empty arguments. + 2020-01-16 Siddhesh Poyarekar vcs-to-changelog: Add documentation. diff --git a/build-aux/vcstocl/frontend_c.py b/build-aux/vcstocl/frontend_c.py index 81f37ffa4d..e898926863 100644 --- a/build-aux/vcstocl/frontend_c.py +++ b/build-aux/vcstocl/frontend_c.py @@ -266,7 +266,7 @@ class DeclParser(ExprParser): ExprParser.ATTRIBUTE + ';') # Function Declarations. - FNDECL_RE = re.compile(r'\s*(\w+)\s*\([^\(][^;]*\)\s*' + + FNDECL_RE = re.compile(r'\s*(\w+)\s*\(([^\(][^;]*)?\)\s*' + ExprParser.ATTRIBUTE + ';') def __init__(self, regex, blocktype, project_quirks, debug): -- cgit v1.2.1