Remove non-determinism by favouring x64 (alphabetically lower). The bases detection requires improvement.

This commit is contained in:
Mike Auty
2017-04-23 02:43:08 +01:00
parent 60ded760b6
commit 7bf332617e
+2 -2
View File
@@ -155,7 +155,7 @@ class Version1Format(ISFormatTable):
"""Determines the appropriate native_types to use from the JSON data"""
# TODO: Consider how to generate the natives entirely from the ISF
classes = {"x64": native.x64NativeTable, "x86": native.x86NativeTable}
for nc in classes:
for nc in sorted(classes):
native_class = classes[nc]
for base_type in self._json_object['base_types']:
try:
@@ -310,7 +310,7 @@ class Version2Format(Version1Format):
def _get_natives(self):
"""Determines the appropriate native_types to use from the JSON data"""
classes = {"x64": native.x64NativeTable, "x86": native.x86NativeTable}
for nc in classes:
for nc in sorted(classes):
native_class = classes[nc]
for base_type in self._json_object['base_types']:
try: