From 47639fb9acb3da7fa44e16ad15b9237191e6c482 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Wed, 17 Jul 2019 10:22:21 -0500 Subject: [PATCH] lua alphabetically sort perl generated rocklib_aux functions Change-Id: I6566c19a0fee630a5e250c1244159d5b488b57ff --- apps/plugins/lua/rocklib_aux.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/plugins/lua/rocklib_aux.pl b/apps/plugins/lua/rocklib_aux.pl index cad2f887ef..5d77288cc1 100755 --- a/apps/plugins/lua/rocklib_aux.pl +++ b/apps/plugins/lua/rocklib_aux.pl @@ -270,9 +270,12 @@ sub out_bool return sprintf("\tbool result = %s;\n\tlua_pushboolean(L, result);\n\treturn 1;\n", $name); } +#Sort the functions +my @sorted_functions = sort { @$a{'name'} cmp @$b{'name'} } @functions; + # Print the functions my @valid_functions; -foreach my $function (@functions) +foreach my $function (@sorted_functions) { my $valid = 1, @arguments = (); # Check for supported arguments