diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-09-09 16:36:23 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-09-14 14:32:42 +0200 |
commit | 4c2144fa755146002cac395ae4090e140795541e (patch) | |
tree | 6b7149472c7ff6b2aa9e12a3d497304ea9d83c50 /rtemsspec | |
parent | interface: Simplify return attribute (diff) | |
download | rtems-central-4c2144fa755146002cac395ae4090e140795541e.tar.bz2 |
interface: Add parameters and return to typedefs
Diffstat (limited to 'rtemsspec')
-rw-r--r-- | rtemsspec/interface.py | 10 | ||||
-rw-r--r-- | rtemsspec/tests/spec-interface/float_t.yml | 2 | ||||
-rw-r--r-- | rtemsspec/tests/spec-interface/td.yml | 2 | ||||
-rw-r--r-- | rtemsspec/tests/spec-interface/td3.yml | 2 | ||||
-rw-r--r-- | rtemsspec/tests/spec-interface/uint32_t.yml | 2 |
5 files changed, 17 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 diff --git a/rtemsspec/tests/spec-interface/float_t.yml b/rtemsspec/tests/spec-interface/float_t.yml index 9161c2ab..24f009b5 100644 --- a/rtemsspec/tests/spec-interface/float_t.yml +++ b/rtemsspec/tests/spec-interface/float_t.yml @@ -8,4 +8,6 @@ links: - role: interface-placement uid: math name: float_t +params: [] +return: null type: interface diff --git a/rtemsspec/tests/spec-interface/td.yml b/rtemsspec/tests/spec-interface/td.yml index d803ce44..e4f5cb29 100644 --- a/rtemsspec/tests/spec-interface/td.yml +++ b/rtemsspec/tests/spec-interface/td.yml @@ -19,4 +19,6 @@ links: uid: h name: Integer notes: null +params: [] +return: null type: interface diff --git a/rtemsspec/tests/spec-interface/td3.yml b/rtemsspec/tests/spec-interface/td3.yml index 1b78d7bf..b1ef1622 100644 --- a/rtemsspec/tests/spec-interface/td3.yml +++ b/rtemsspec/tests/spec-interface/td3.yml @@ -19,4 +19,6 @@ links: uid: gb name: Integer3 notes: null +params: [] +return: null type: interface diff --git a/rtemsspec/tests/spec-interface/uint32_t.yml b/rtemsspec/tests/spec-interface/uint32_t.yml index c77d95d7..3fffa0cf 100644 --- a/rtemsspec/tests/spec-interface/uint32_t.yml +++ b/rtemsspec/tests/spec-interface/uint32_t.yml @@ -10,4 +10,6 @@ links: - role: interface-placement uid: stdint name: uint32_t +params: [] +return: null type: interface |