From 4c52537bf30039500192a59a66972f7a6bc4ae6e Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 24 Jun 2020 09:58:07 +0200 Subject: interface: Fix format of macros --- rtemsqual/interface.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'rtemsqual/interface.py') diff --git a/rtemsqual/interface.py b/rtemsqual/interface.py index 76092f1a..7bc76076 100644 --- a/rtemsqual/interface.py +++ b/rtemsqual/interface.py @@ -356,7 +356,10 @@ class Node: def _get_macro_definition(self, item: Item, definition: Any) -> Lines: name = item["name"] params = [param["name"] for param in item["params"]] - param_line = ", ".join(params) + if params: + param_line = " " + ", ".join(params) + " " + else: + param_line = "" line = f"#define {name}({param_line})" if len(line) > 79: param_block = ", \\\n ".join(params) -- cgit v1.2.3