diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-08-22 02:25:20 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-08-22 20:05:11 +0200 |
| commit | d2c1430c91c574dc0dfd84f3652c8d9af8c77568 (patch) | |
| tree | 11c0d1a6a9ef28d538bcd963e80ee47395db6c5f /allnoconfig.py | |
| parent | a3252f620fad970bbe8b7470401a04ee4225193e (diff) | |
Introduce Kconfig.unique_defined_syms and Kconfig.unique_choices
These are the same as Kconfig.defined_syms and Kconfig.choices, except
duplicates are removed. Kconfig order is still preserved.
This is almost always what you want when iterating through symbols and
choices, as it potentially saves work, avoids generating duplicates when
writing output, and still preserves Kconfig order for readability.
The old attributes will be kept for backwards compatibility (maybe
there's some rare cases where they could be useful too). They're created
internally anyway.
Diffstat (limited to 'allnoconfig.py')
| -rwxr-xr-x | allnoconfig.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/allnoconfig.py b/allnoconfig.py index 173bf3f..4e1c228 100755 --- a/allnoconfig.py +++ b/allnoconfig.py @@ -31,9 +31,7 @@ def main(): # symbol types, which is what we want. kconf.disable_warnings() - # The set() speeds things up for projects that use multiple definition - # locations a lot - for sym in set(kconf.defined_syms): + for sym in kconf.unique_defined_syms: sym.set_value(2 if sym.is_allnoconfig_y else 0) kconf.write_config(kconfiglib.standard_config_filename()) |
