summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorDiogo Franco (Kovensky) <diogomfranco@gmail.com>2013-11-02 01:43:49 +0000
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2013-11-02 01:43:49 +0000
commit6dd97ccf5c89db1be2312ffee3d81f74afb6d80a (patch)
treeff4d6e6cc9301cbcd20282970ea7e0967bbcde9a /TOOLS
parente0b6fdeb8d9a54c357ff9fbf552e1ff4b6282282 (diff)
downloadmpv-6dd97ccf5c89db1be2312ffee3d81f74afb6d80a.tar.bz2
mpv-6dd97ccf5c89db1be2312ffee3d81f74afb6d80a.tar.xz
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.
Diffstat (limited to 'TOOLS')
-rwxr-xr-xTOOLS/matroska.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/TOOLS/matroska.pl b/TOOLS/matroska.pl
index 3ab06df6f9..4eda2de44f 100755
--- a/TOOLS/matroska.pl
+++ b/TOOLS/matroska.pl
@@ -101,7 +101,7 @@ sub generate_c_definitions {
# define a field for each subelement
# 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}, ".
($subel->{multiple}?'1':'0').")\n";
}
@@ -166,4 +166,4 @@ sub process_elem {
} else {
print "$elem->{type} ". $elem->get_value ."\n";
}
-} \ No newline at end of file
+}