Sort value_string array by value if used with value_str_ext fcns;

svn path=/trunk/; revision=34874
This commit is contained in:
Bill Meier 2010-11-14 23:48:07 +00:00
parent 84dd318764
commit 1b7474fab6
1 changed files with 2 additions and 0 deletions

View File

@ -1358,6 +1358,8 @@ class EthCtx:
out = ""
has_enum = self.eth_type[tname]['enum'] & EF_ENUM
use_ext = self.eth_type[tname]['vals_ext']
if (use_ext):
vals.sort(key=lambda vals_entry: int(vals_entry[0]))
if (not self.eth_type[tname]['export'] & EF_VALS):
out += 'static '
if (self.eth_type[tname]['export'] & EF_VALS) and (self.eth_type[tname]['export'] & EF_TABLE):