aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/codegen
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-04-05 08:02:42 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-04-05 08:02:42 -0700
commit3d13d7e162f39c24d7bdd915981ebb74154bc91e (patch)
tree28821bc1fdda0d47705e732c20a5866659be491f /tools/codegen
parentdad1ea288cc4408cf62e9f971d3a43fe0b941e4f (diff)
Update copyright, choose a better sort order for our enum
Diffstat (limited to 'tools/codegen')
-rwxr-xr-xtools/codegen/core/gen_settings_ids.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/codegen/core/gen_settings_ids.py b/tools/codegen/core/gen_settings_ids.py
index 54498a18f2..4253396ead 100755
--- a/tools/codegen/core/gen_settings_ids.py
+++ b/tools/codegen/core/gen_settings_ids.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python2.7
-# Copyright 2015, Google Inc.
+# Copyright 2017, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -106,10 +106,9 @@ decorated_settings = [DecoratedSetting(hash(setting.id), name, setting)
for name, setting in _SETTINGS.iteritems()]
print >>H, 'typedef enum {'
-for name in sorted(_SETTINGS.keys()):
- setting = _SETTINGS[name]
+for decorated_setting in sorted(decorated_settings):
print >>H, ' GRPC_CHTTP2_SETTINGS_%s = %d, /* wire id %d */' % (
- name, hash(setting.id), setting.id)
+ decorated_setting.name, decorated_setting.enum, decorated_setting.setting.id)
print >>H, '} grpc_chttp2_setting_id;'
print >>H
print >>H, '#define GRPC_CHTTP2_NUM_SETTINGS %d' % (max(x.enum for x in decorated_settings) + 1)