diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2023-02-07 13:36:34 -0800 |
|---|---|---|
| committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2023-02-08 15:31:58 +0530 |
| commit | ee8e7ada1da1327e91dba8d50b9cf21c63168a04 (patch) | |
| tree | 204048ed5684c2bf0385323c4a5be4888bfb5ed2 /mesonbuild/compilers | |
| parent | b2f7f2da1c5e693a426b0aa636a8b256bd1efe83 (diff) | |
| download | meson-ee8e7ada1da1327e91dba8d50b9cf21c63168a04.tar.gz | |
compilers: Copy const always_args before returning
Eventually we would probably be better served (to avoid unnecessary
copies) to use the ImmutableListProtocol here, but for the moment this
is effective, it's also what we do in every other case.
Diffstat (limited to 'mesonbuild/compilers')
| -rw-r--r-- | mesonbuild/compilers/mixins/visualstudio.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/compilers/mixins/visualstudio.py b/mesonbuild/compilers/mixins/visualstudio.py index 48d0bbbe7..de179af77 100644 --- a/mesonbuild/compilers/mixins/visualstudio.py +++ b/mesonbuild/compilers/mixins/visualstudio.py @@ -140,7 +140,8 @@ class VisualStudioLikeCompiler(Compiler, metaclass=abc.ABCMeta): # Override CCompiler.get_always_args def get_always_args(self) -> T.List[str]: - return self.always_args + # TODO: use ImmutableListProtocol[str] here instead + return self.always_args.copy() def get_pch_suffix(self) -> str: return 'pch' |
