Update copyright, choose a better sort order for our enum
diff --git a/src/core/ext/transport/chttp2/transport/http2_settings.c b/src/core/ext/transport/chttp2/transport/http2_settings.c
index 05f0d8c..52969e6 100644
--- a/src/core/ext/transport/chttp2/transport/http2_settings.c
+++ b/src/core/ext/transport/chttp2/transport/http2_settings.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2015, Google Inc.
+ * Copyright 2017, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/core/ext/transport/chttp2/transport/http2_settings.h b/src/core/ext/transport/chttp2/transport/http2_settings.h
index 393c14f..61048a6 100644
--- a/src/core/ext/transport/chttp2/transport/http2_settings.h
+++ b/src/core/ext/transport/chttp2/transport/http2_settings.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2015, Google Inc.
+ * Copyright 2017, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -40,13 +40,13 @@
#include <stdint.h>
typedef enum {
- GRPC_CHTTP2_SETTINGS_ENABLE_PUSH = 1, /* wire id 2 */
- GRPC_CHTTP2_SETTINGS_GRPC_ALLOW_TRUE_BINARY_METADATA = 6, /* wire id 65027 */
GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE = 0, /* wire id 1 */
- GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE = 3, /* wire id 4 */
+ GRPC_CHTTP2_SETTINGS_ENABLE_PUSH = 1, /* wire id 2 */
GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS = 2, /* wire id 3 */
+ GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE = 3, /* wire id 4 */
GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE = 4, /* wire id 5 */
GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE = 5, /* wire id 6 */
+ GRPC_CHTTP2_SETTINGS_GRPC_ALLOW_TRUE_BINARY_METADATA = 6, /* wire id 65027 */
} grpc_chttp2_setting_id;
#define GRPC_CHTTP2_NUM_SETTINGS 7
diff --git a/tools/codegen/core/gen_settings_ids.py b/tools/codegen/core/gen_settings_ids.py
index 54498a1..4253396 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 @@
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)