diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-14 00:02:18 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-14 00:11:10 +0200 |
| commit | b04cc612c54b18195697699ce6fd7d4651cf2723 (patch) | |
| tree | 980661597fedca9241dc64b0435a37c2da647891 | |
| parent | 61bc2ac6b1a13cf27c656061d7fc1b28319bad7b (diff) | |
Initialize already_written in Symbol.__init__().
Oversight. No functional changes, but less cryptic than creating it
dynamically.
Also comment and rearrange a bit.
| -rw-r--r-- | kconfiglib.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index da0f588..273ff76 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -362,9 +362,6 @@ class Config(object): beginning of the file, with each line commented out automatically. None means no header.""" - # already_written is set when _make_conf() is called on a symbol, so - # that symbols defined in multiple locations only get one entry in the - # .config. We need to reset it prior to writing out a new .config. for sym in self.syms_iter(): sym.already_written = False @@ -2361,14 +2358,6 @@ class Symbol(Item): self.user_val = None - # Flags - - # Should the symbol get an entry in .config? - self.write_to_conf = False - - # Caches the calculated value - self.cached_val = None - # Populated in Config._build_dep() after parsing. Links the symbol to # the symbols that immediately depend on it (in a caching/invalidation # sense). The total set of dependent symbols for the symbol (the @@ -2376,10 +2365,23 @@ class Symbol(Item): # _get_dependent(). self.dep = set() + # Cached values and flags + + # Caches the calculated value + self.cached_val = None + # Caches the total list of dependent symbols. Calculated in # _get_dependent(). self.cached_deps = None + # Should the symbol get an entry in .config? + self.write_to_conf = False + + # Set to true when _make_conf() is called on a symbol, so that symbols + # defined in multiple locations only get one .config entry. We need to + # reset it prior to writing out a new .config. + self.already_written = False + # Does the symbol have an entry in the Kconfig file? The trailing # underscore avoids a collision with is_defined(). self.is_defined_ = False |
