diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-05-12 19:14:54 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-05-28 10:38:22 +0200 |
commit | 7fb443692de2b80ae7b789baad49710c18917fcb (patch) | |
tree | 15917a72b283aa8680f34dac4a881c8f21e759ce /rtemsqual/interface.py | |
parent | interface: Skip default definition only if null (diff) | |
download | rtems-central-7fb443692de2b80ae7b789baad49710c18917fcb.tar.bz2 |
interface: Allow defines without a value
Diffstat (limited to 'rtemsqual/interface.py')
-rw-r--r-- | rtemsqual/interface.py | 5 |
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"]) |