summaryrefslogtreecommitdiffstats
path: root/rtemsqual/interface.py
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-05-12 19:14:54 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-05-28 10:38:22 +0200
commit7fb443692de2b80ae7b789baad49710c18917fcb (patch)
tree15917a72b283aa8680f34dac4a881c8f21e759ce /rtemsqual/interface.py
parentinterface: Skip default definition only if null (diff)
downloadrtems-central-7fb443692de2b80ae7b789baad49710c18917fcb.tar.bz2
interface: Allow defines without a value
Diffstat (limited to 'rtemsqual/interface.py')
-rw-r--r--rtemsqual/interface.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/rtemsqual/interface.py b/rtemsqual/interface.py
index d5089299..45cea8f2 100644
--- a/rtemsqual/interface.py
+++ b/rtemsqual/interface.py
@@ -332,7 +332,10 @@ class Node:
def _get_define_definition(self, item: Item, definition: Any) -> Lines:
name = item["interface-name"]
- return f"#define {name} {self.substitute(definition)}".split("\n")
+ value = self.substitute(definition)
+ if value:
+ return f"#define {name} {value}".split("\n")
+ return f"#define {name}"
def _get_function_definition(self, item: Item, definition: Any) -> Lines:
ret = self.substitute(definition["return"])