From 98af94da6a9ef81c8e2c56fbf60741fa8d2a2dd1 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 16 Oct 2018 06:58:54 +0200 Subject: Make Kconfig.choices match its description Kconfig.choices has accidentally been identical to Kconfig.unique_choices all along, because named choices defined in multiple locations (which are pretty obscure) were only added once. Fix Kconfig.choices to match its description. This simplifies the code a bit too. Kconfig.unique_choices is usually what you want. --- kconfiglib.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'kconfiglib.py') diff --git a/kconfiglib.py b/kconfiglib.py index 700870d..d9af800 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -2579,8 +2579,6 @@ class Kconfig(object): if self._peek_token() is None: choice = Choice() choice.direct_dep = self.n - - self.choices.append(choice) else: # Named choice name = self._expect_str_and_eol() @@ -2589,10 +2587,10 @@ class Kconfig(object): choice = Choice() choice.name = name choice.direct_dep = self.n - - self.choices.append(choice) self.named_choices[name] = choice + self.choices.append(choice) + choice.kconfig = self node = MenuNode() -- cgit v1.2.3