From 4c2144fa755146002cac395ae4090e140795541e Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 9 Sep 2021 16:36:23 +0200 Subject: interface: Add parameters and return to typedefs --- rtemsspec/interface.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'rtemsspec/interface.py') diff --git a/rtemsspec/interface.py b/rtemsspec/interface.py index fa66fe8a..7c303f35 100644 --- a/rtemsspec/interface.py +++ b/rtemsspec/interface.py @@ -216,6 +216,13 @@ def _get_register_name(definition: Dict[str, Any]) -> Tuple[str, str]: return name, alias +_CONSTRAINT_TARGET = { + "interface/function": "this directive", + "interface/macro": "this directive", + "interface/typedef": "functions of this type", +} + + class Node: """ Nodes of a header file. """ @@ -609,9 +616,10 @@ class Node: ] if constraints: constraint_content = CContent() + target = _CONSTRAINT_TARGET[item.type] constraint_content.add_list( constraints, - "The following constraints apply to this directive:") + f"The following constraints apply to {target}:") content.add_paragraph("Constraints", constraint_content) return content -- cgit v1.2.3