diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-08-04 19:57:26 +0200 |
|---|---|---|
| committer | Jussi Pakkanen <jussi.pakkanen@mailbox.org> | 2025-10-29 18:59:30 +0200 |
| commit | 97477e3aae0201bd679dfd787c83f3bd6026eb0c (patch) | |
| tree | 08eba5bde24c8b7c7c02e0e9cb2238e575197f46 /mesonbuild/interpreter | |
| parent | 9ca756ba04a94e321f2afc681c22bfbb7c63be15 (diff) | |
| download | meson-97477e3aae0201bd679dfd787c83f3bd6026eb0c.tar.gz | |
options: rename get_value_object_and_value_for
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild/interpreter')
| -rw-r--r-- | mesonbuild/interpreter/interpreter.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index 3e1010471..437018424 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -1078,28 +1078,28 @@ class Interpreter(InterpreterBase, HoldableObject): if optname_regex.search(optname.split('.', maxsplit=1)[-1]) is not None: raise InterpreterException(f'Invalid option name {optname!r}') - value_object: T.Optional[options.AnyOptionType] + option_object: T.Optional[options.AnyOptionType] try: optkey = options.OptionKey.from_string(optname).evolve(subproject=self.subproject) - value_object, value = self.coredata.optstore.get_value_object_and_value_for(optkey) + option_object, value = self.coredata.optstore.get_option_and_value_for(optkey) except KeyError: if self.coredata.optstore.is_base_option(optkey): # Due to backwards compatibility return the default # option for base options instead of erroring out. - value_object = options.COMPILER_BASE_OPTIONS[optkey.evolve(subproject=None, machine=MachineChoice.HOST)] - value = value_object.default + option_object = options.COMPILER_BASE_OPTIONS[optkey.evolve(subproject=None, machine=MachineChoice.HOST)] + value = option_object.default else: if self.subproject: raise MesonException(f'Option {optname} does not exist for subproject {self.subproject}.') raise MesonException(f'Option {optname} does not exist.') - if isinstance(value_object, options.UserFeatureOption): - ocopy = copy.copy(value_object) + if isinstance(option_object, options.UserFeatureOption): + ocopy = copy.copy(option_object) ocopy.name = optname ocopy.value = value return ocopy elif optname == 'b_sanitize': - assert isinstance(value_object, options.UserStringArrayOption) + assert isinstance(option_object, options.UserStringArrayOption) # To ensure backwards compatibility this always returns a string. # We may eventually want to introduce a new "format" kwarg that # allows the user to modify this behaviour, but for now this is |
