From 51f657fde8d771ca5c4002ca70ad5175c6ef3cdf Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 14 Dec 2014 12:36:43 +0100 Subject: iirs: reduce size of signal_declaration. --- src/xtools/pnodes.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/xtools/pnodes.py') diff --git a/src/xtools/pnodes.py b/src/xtools/pnodes.py index e00cf4d..f621802 100755 --- a/src/xtools/pnodes.py +++ b/src/xtools/pnodes.py @@ -696,9 +696,13 @@ elif args.action == 'meta_body': print for f in funcs: gen_has_func_spec(f.name, ' is') - print ' begin' choices = [k for k in kinds if f.name in nodes[k].attrs] - if len(choices) == 1: + if len(choices) == 0: + print ' pragma Unreferenced (K);' + print ' begin' + if len(choices) == 0: + print ' return False;' + elif len(choices) == 1: print ' return K = ' + prefix_name + choices[0] + ';' else: print ' case K is' -- cgit