mirror of
https://github.com/mpv-player/mpv
synced 2025-05-04 17:19:29 +00:00
matroska.pl: Sort the generated struct field list
Newer versions of perl randomize the hash used for hashes every time it's run; this makes the order of the fields be non-deterministic. Tack a sort there to make it deterministic. Needed to fix (or allow fixing) a buggy gcc warning.
This commit is contained in:
parent
e0b6fdeb8d
commit
6dd97ccf5c
@ -101,7 +101,7 @@ sub generate_c_definitions {
|
|||||||
|
|
||||||
# define a field for each subelement
|
# define a field for each subelement
|
||||||
# also does lots of macro magic, but doesn't open a scope
|
# also does lots of macro magic, but doesn't open a scope
|
||||||
for my $subel (values %{$el->{subelements}}) {
|
for my $subel (sort { $a->{definename} cmp $b->{definename} } values %{$el->{subelements}}) {
|
||||||
print "F($subel->{definename}, $subel->{fieldname}, ".
|
print "F($subel->{definename}, $subel->{fieldname}, ".
|
||||||
($subel->{multiple}?'1':'0').")\n";
|
($subel->{multiple}?'1':'0').")\n";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user