aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/codegen
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-11-18 15:10:41 -0800
committerGravatar Craig Tiller <ctiller@google.com>2015-11-18 15:10:41 -0800
commit328d4b18a52b7f4a59e05d89590b2bed77b61aef (patch)
treed936498c3d3b254f59b34cd0e93ea2b9c4e52117 /tools/codegen
parent2e7687c5ef7fa8bb3faf18f55a1b1817c546f25c (diff)
More const
Diffstat (limited to 'tools/codegen')
-rwxr-xr-xtools/codegen/core/gen_static_metadata.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py
index f1492d5574..a472ac3ef3 100755
--- a/tools/codegen/core/gen_static_metadata.py
+++ b/tools/codegen/core/gen_static_metadata.py
@@ -247,14 +247,14 @@ def str_idx(s):
if s == s2:
return i
-print >>H, 'gpr_uint8 grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT*2];'
-print >>C, 'gpr_uint8 grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT*2] = {'
+print >>H, 'const gpr_uint8 grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT*2];'
+print >>C, 'const gpr_uint8 grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT*2] = {'
print >>C, ','.join('%d' % str_idx(x) for x in itertools.chain.from_iterable([a,b] for a, b in all_elems))
print >>C, '};'
print >>C
-print >>H, 'const char *grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT];'
-print >>C, 'const char *grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = {'
+print >>H, 'const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT];'
+print >>C, 'const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = {'
print >>C, '%s' % ',\n'.join(' "%s"' % s for s in all_strs)
print >>C, '};'
print >>C