Skip to content

Commit

Permalink
Traverse structures in deterministic order
Browse files Browse the repository at this point in the history
Fixes #41

PiperOrigin-RevId: 272307387
Change-Id: I3dbb3a9b74718b7a36f6f71d3be87ac6edb5119e
  • Loading branch information
asbelsare committed Oct 1, 2019
1 parent 9bd6b91 commit 72883b0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def get_constants():
data_type, {{"const_val1", const_val1}, {"const_val2", const_val2}}}}, \
"""
enum_rows = []
for enum_name, enum_properties in _enum_map.items():
for enum_name, enum_properties in sorted(_enum_map.items()):
enum_rows.append(
'{{{name}, {{{default_value_host}, {default_value_newlib}, '
'{multi_valued}, {skip_conversions}, {or_input_to_default_value}, '
Expand Down Expand Up @@ -278,7 +278,7 @@ def get_structs():
{{"member_name1", "member_type1"}, {"member_name2", "member_type2"}}}}
"""
struct_rows = []
for struct_name, struct_properties in _struct_map.items():
for struct_name, struct_properties in sorted(_struct_map.items()):
struct_rows.append(
'{{{struct}, {{{pack_attributes}, {skip_conversions}, {{{values}}}}}}}'
.format(
Expand Down

0 comments on commit 72883b0

Please sign in to comment.