C, render empty argument lists for macros.

Fixes #2410
This commit is contained in:
Jakob Lykke Andersen 2018-06-09 17:12:43 +02:00
parent 1240fededa
commit 515fb53b60
2 changed files with 3 additions and 1 deletions

View File

@ -22,6 +22,7 @@ Bugs fixed
* #5022: latex: crashed with docutils package provided by Debian/Ubuntu
* #5009: latex: a label for table is vanished if table does not have a caption
* #5048: crashed with numbered toctree
* #2410: C, render empty argument lists for macros.
Testing
--------

View File

@ -147,7 +147,8 @@ class CObject(ObjectDescription):
fullname = name
if not arglist:
if self.objtype == 'function':
if self.objtype == 'function' or \
self.objtype == 'macro' and sig.rstrip().endswith('()'):
# for functions, add an empty parameter list
signode += addnodes.desc_parameterlist()
if const: