Commit 9e41f91a authored by Maxime Perrotin's avatar Maxime Perrotin

Fix learn_CHOICE_enums script

If enums have big numbers (> int) asn1scc generates their value with LL
suffix. This broke the basic string parser in this script.
parent 03ee6836
......@@ -31,9 +31,9 @@ enums_dump = "\n ".join(
)
enums_dump += "\n ".join(
'printf("%s = %d\\n");' % (name.strip(), int(val))
for name, val in enums
)
'printf("{} = {}\\n");'.format(name.strip(), val.strip('L'))
for name, val in enums)
uniq = os.getpid()
extractor_filename = "/tmp/enums_%d" % uniq
f = open(extractor_filename + ".c", 'w')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment