Skip to content

Commit

Permalink
C, add support for return value list
Browse files Browse the repository at this point in the history
Add support for a new doc field type that allows to display a list of
return values.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
  • Loading branch information
gmarull committed Oct 1, 2021
1 parent 0424210 commit 8820551
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sphinx/domains/c.py
Expand Up @@ -36,7 +36,7 @@
float_literal_suffix_re, hex_literal_re, identifier_re,
integer_literal_re, integers_literal_suffix_re,
octal_literal_re, verify_description_mode)
from sphinx.util.docfields import Field, TypedField
from sphinx.util.docfields import Field, TypedField, GroupedField
from sphinx.util.docutils import SphinxDirective
from sphinx.util.nodes import make_refnode
from sphinx.util.typing import OptionSpec
Expand Down Expand Up @@ -3134,6 +3134,8 @@ class CObject(ObjectDescription[ASTDeclaration]):
TypedField('parameter', label=_('Parameters'),
names=('param', 'parameter', 'arg', 'argument'),
typerolename='expr', typenames=('type',)),
GroupedField('retval', label=_('Return values'),
names=('retvals', 'retval')),
Field('returnvalue', label=_('Returns'), has_arg=False,
names=('returns', 'return')),
Field('returntype', label=_('Return type'), has_arg=False,
Expand Down

0 comments on commit 8820551

Please sign in to comment.