summaryrefslogtreecommitdiff
path: root/kconfiglib.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2012-12-13 12:29:24 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2012-12-13 12:29:40 +0100
commit67704952cd6725af4fa7304367fc333bb957c078 (patch)
treeb23998e1142425333e3a7d7e9424c842301492e5 /kconfiglib.py
parent6a0a86dd810f26f4fa38afb87dc8565c8e7aa8b2 (diff)
Add get_config() for Menu, Choice, and Comment.
Omission.
Diffstat (limited to 'kconfiglib.py')
-rw-r--r--kconfiglib.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index c790033..625ff6a 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -2621,8 +2621,7 @@ class Symbol(Item, _HasVisibility):
return self.help
def get_config(self):
- """Returns the Config instance that represents the configuration this
- symbol is from."""
+ """Returns the Config instance this symbol is from."""
return self.config
def get_def_locations(self):
@@ -3000,6 +2999,10 @@ class Menu(Item):
# Public interface
#
+ def get_config(self):
+ """Return the Config instance this menu is from."""
+ return self.config
+
def get_visibility(self):
"""Returns the visibility of the menu. This also affects the visibility
of subitems. See also Symbol.get_visibility()."""
@@ -3198,6 +3201,10 @@ class Choice(Item, _HasVisibility):
symbol, returns that symbol. Otherwise, returns None."""
return self.user_val
+ def get_config(self):
+ """Returns the Config instance this choice is from."""
+ return self.config
+
def get_name(self):
"""For named choices, returns the name. Returns None for unnamed
choices. No named choices appear anywhere in the kernel Kconfig
@@ -3409,6 +3416,10 @@ class Comment(Item):
# Public interface
#
+ def get_config(self):
+ """Returns the Config instance this comment is from."""
+ return self.config
+
def get_visibility(self):
"""Returns the visibility of the comment. See also
Symbol.get_visibility()."""