diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2020-11-18 22:52:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-18 22:52:57 +0200 |
commit | 1c582a9de4cd0e5f332ba5b626034f62baf103c6 (patch) | |
tree | 08c30e539405d33dfb9b496d6b2cfeff5e4c16ff /mesonbuild/interpreterbase.py | |
parent | f1ce78d77f178deb7a458235132d1fc8c44d0afe (diff) | |
parent | 0b2865e8b95ef119271011c5854836589e8866ad (diff) | |
download | meson-1c582a9de4cd0e5f332ba5b626034f62baf103c6.zip meson-1c582a9de4cd0e5f332ba5b626034f62baf103c6.tar.gz meson-1c582a9de4cd0e5f332ba5b626034f62baf103c6.tar.bz2 |
Merge pull request #7900 from bonzini/stabilize-hash
Avoid build.ninja changes due to order of hash table iteration
Diffstat (limited to 'mesonbuild/interpreterbase.py')
-rw-r--r-- | mesonbuild/interpreterbase.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/interpreterbase.py b/mesonbuild/interpreterbase.py index d3f8181..e57580b 100644 --- a/mesonbuild/interpreterbase.py +++ b/mesonbuild/interpreterbase.py @@ -823,7 +823,7 @@ The result of this is undefined and will become a hard error in a future Meson r elif isinstance(items, dict): if len(node.varnames) != 2: raise InvalidArguments('Foreach on dict unpacks key and value') - for key, value in items.items(): + for key, value in sorted(items.items()): self.set_variable(node.varnames[0], key) self.set_variable(node.varnames[1], value) try: @@ -1166,7 +1166,7 @@ The result of this is undefined and will become a hard error in a future Meson r if method_name == 'keys': if len(posargs) != 0: raise InterpreterException('keys() takes no arguments.') - return list(obj.keys()) + return sorted(obj.keys()) raise InterpreterException('Dictionaries do not have a method called "%s".' % method_name) |