[pypy-commit] cffi default: Remove a dictionary order dependency (idnar on irc)
arigo
noreply at buildbot.pypy.org
Thu Sep 17 15:19:02 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r2271:1cfe8c7a59e8
Date: 2015-09-17 15:19 +0200
http://bitbucket.org/cffi/cffi/changeset/1cfe8c7a59e8/
Log: Remove a dictionary order dependency (idnar on irc)
diff --git a/cffi/recompiler.py b/cffi/recompiler.py
--- a/cffi/recompiler.py
+++ b/cffi/recompiler.py
@@ -879,7 +879,9 @@
# because they don't have any known C name. Check that they are
# not partial (we can't complete or verify them!) and emit them
# anonymously.
- for tp in list(self._struct_unions):
+ lst = self._struct_unions.items()
+ lst.sort(key=lambda (tp, order): order)
+ for tp, order in lst:
if tp not in self._seen_struct_unions:
if tp.partial:
raise NotImplementedError("internal inconsistency: %r is "
More information about the pypy-commit
mailing list