diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-06-19 10:06:04 +0200 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-10-06 14:44:31 -0700 |
| commit | 18bac4af9ec124fb3db242bfee23ec1a9134b872 (patch) | |
| tree | 3302e6ce9f4f4d598d2b57ffe6f054c60ac2a61c | |
| parent | 8624662c3c811ded9a17ac6468ea01bd5a418eb9 (diff) | |
| download | meson-18bac4af9ec124fb3db242bfee23ec1a9134b872.tar.gz | |
options: remove set_value_object
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| -rw-r--r-- | mesonbuild/options.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/mesonbuild/options.py b/mesonbuild/options.py index 6b57c6885..dcfa4c3b6 100644 --- a/mesonbuild/options.py +++ b/mesonbuild/options.py @@ -1146,11 +1146,6 @@ class OptionStore: new_value = prefix_mapping[new_prefix] valobj.set_value(new_value) - # FIXME, this should be removed.or renamed to "change_type_of_existing_object" or something like that - def set_value_object(self, key: T.Union[OptionKey, str], new_object: AnyOptionType) -> None: - key = self.ensure_and_validate_key(key) - self.options[key] = new_object - def get_value_object(self, key: T.Union[OptionKey, str]) -> AnyOptionType: key = self.ensure_and_validate_key(key) return self.options[key] @@ -1407,6 +1402,7 @@ class OptionStore: def update_project_options(self, project_options: MutableKeyedOptionDictType, subproject: SubProject) -> None: for key, value in project_options.items(): + assert key.machine is MachineChoice.HOST if key not in self.options: self.add_project_option(key, value) continue @@ -1420,7 +1416,7 @@ class OptionStore: # If the choices have changed, use the new value, but attempt # to keep the old options. If they are not valid keep the new # defaults but warn. - self.set_value_object(key, value) + self.options[key] = value try: value.set_value(oldval.value) except MesonException: |
