summaryrefslogtreecommitdiffstats
path: root/rtemsspec/interface.py
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-09-09 16:36:23 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-09-14 14:32:42 +0200
commit4c2144fa755146002cac395ae4090e140795541e (patch)
tree6b7149472c7ff6b2aa9e12a3d497304ea9d83c50 /rtemsspec/interface.py
parentinterface: Simplify return attribute (diff)
downloadrtems-central-4c2144fa755146002cac395ae4090e140795541e.tar.bz2
interface: Add parameters and return to typedefs
Diffstat (limited to 'rtemsspec/interface.py')
-rw-r--r--rtemsspec/interface.py10
1 files changed, 9 insertions, 1 deletions
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