]> Savannah Git Hosting - gnulib.git/commitdiff
vcs-to-changelog: Fix parsing of fndecl without args.
authorSiddhesh Poyarekar <siddhesh@gotplt.org>
Thu, 16 Jan 2020 16:11:34 +0000 (21:41 +0530)
committerBruno Haible <bruno@clisp.org>
Thu, 16 Jan 2020 20:29:57 +0000 (21:29 +0100)
* build-aux/vcstocl/frontend_c.py (FNDECL_RE): Fix regular
expression for empty arguments.

ChangeLog
build-aux/vcstocl/frontend_c.py

index 560765244e2f8a99abcab366d8342897722575a7..643dba312c104e3b8456a782ca5ec5a514bfd02c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-01-16  Siddhesh Poyarekar  <siddhesh@gotplt.org>
+
+       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  <siddhesh@gotplt.org>
 
        vcs-to-changelog: Add documentation.
index 81f37ffa4d7a4e8bddc54f4f9d882c45808e8efd..e898926863ea178921f09f085e614a87c50911cb 100644 (file)
@@ -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):