From 933e322dd5c3e69063208d68f43c86e18d264a60 Mon Sep 17 00:00:00 2001 From: omniavinco Date: Thu, 16 Oct 2014 23:46:52 +0900 Subject: [PATCH] Sort the enums in a stable manner --- auto/bin/make.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/auto/bin/make.pl b/auto/bin/make.pl index 83bb774..1bd5d40 100755 --- a/auto/bin/make.pl +++ b/auto/bin/make.pl @@ -156,7 +156,11 @@ sub output_tokens($$) if (${$tbl}{$b} =~ /_/) { 1 } else { - hex ${$tbl}{$a} <=> hex ${$tbl}{$b} + if (hex ${$tbl}{$a} eq hex ${$tbl}{$b}) { + $a cmp $b + } else { + hex ${$tbl}{$a} <=> hex ${$tbl}{$b} + } } } }