mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
MacroCollector: default to not including intermediate macros
By default, exclude macros whose numerical value is not a valid member of the semantic type (e.g. PSA_ALG_xxx_BASE is not itself an algorithm, only an intermediate value used to construct others). But do include them with include_intermediate=True, which generate_psa_constants.py does. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
@ -213,6 +213,9 @@ class CaseBuilder(macro_collector.PSAMacroCollector):
|
||||
2. Call `write_file` to write ``psa_constant_names_generated.c``.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(include_intermediate=True)
|
||||
|
||||
@staticmethod
|
||||
def _make_return_case(name):
|
||||
return 'case %(name)s: return "%(name)s";' % {'name': name}
|
||||
|
Reference in New Issue
Block a user