aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/codegen/core/gen_static_metadata.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/codegen/core/gen_static_metadata.py')
-rwxr-xr-xtools/codegen/core/gen_static_metadata.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py
index a681804b30..a6336a3d55 100755
--- a/tools/codegen/core/gen_static_metadata.py
+++ b/tools/codegen/core/gen_static_metadata.py
@@ -197,7 +197,7 @@ for mask in range(1, 1<<len(COMPRESSION_ALGORITHMS)):
all_strs.add(val)
all_elems.add(elem)
compression_elems.append(elem)
- static_userdata[elem] = 1 + mask
+ static_userdata[elem] = 1 + (mask | 1)
all_strs = sorted(list(all_strs), key=mangle)
all_elems = sorted(list(all_elems), key=mangle)
@@ -216,9 +216,9 @@ if args:
C = open('/dev/null', 'w')
else:
H = open(os.path.join(
- os.path.dirname(sys.argv[0]), '../../../src/core/transport/static_metadata.h'), 'w')
+ os.path.dirname(sys.argv[0]), '../../../src/core/lib/transport/static_metadata.h'), 'w')
C = open(os.path.join(
- os.path.dirname(sys.argv[0]), '../../../src/core/transport/static_metadata.c'), 'w')
+ os.path.dirname(sys.argv[0]), '../../../src/core/lib/transport/static_metadata.c'), 'w')
# copy-paste copyright notice from this file
with open(sys.argv[0]) as my_source:
@@ -233,25 +233,25 @@ with open(sys.argv[0]) as my_source:
if line[0] != '#':
break
copyright.append(line)
- put_banner([H,C], [line[1:].strip() for line in copyright])
+ put_banner([H,C], [line[2:].rstrip() for line in copyright])
put_banner([H,C],
"""WARNING: Auto-generated code.
-To make changes to this file, change tools/codegen/core/gen_static_metadata.py,
-and then re-run it.
+To make changes to this file, change
+tools/codegen/core/gen_static_metadata.py, and then re-run it.
-See metadata.h for an explanation of the interface here, and metadata.c for an
-explanation of what's going on.
+See metadata.h for an explanation of the interface here, and metadata.c for
+an explanation of what's going on.
""".splitlines())
-print >>H, '#ifndef GRPC_INTERNAL_CORE_TRANSPORT_STATIC_METADATA_H'
-print >>H, '#define GRPC_INTERNAL_CORE_TRANSPORT_STATIC_METADATA_H'
+print >>H, '#ifndef GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H'
+print >>H, '#define GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H'
print >>H
-print >>H, '#include "src/core/transport/metadata.h"'
+print >>H, '#include "src/core/lib/transport/metadata.h"'
print >>H
-print >>C, '#include "src/core/transport/static_metadata.h"'
+print >>C, '#include "src/core/lib/transport/static_metadata.h"'
print >>C
print >>H, '#define GRPC_STATIC_MDSTR_COUNT %d' % len(all_strs)
@@ -306,7 +306,7 @@ print >>C
print >>H, '#define GRPC_MDELEM_ACCEPT_ENCODING_FOR_ALGORITHMS(algs) (&grpc_static_mdelem_table[grpc_static_accept_encoding_metadata[(algs)]])'
-print >>H, '#endif /* GRPC_INTERNAL_CORE_TRANSPORT_STATIC_METADATA_H */'
+print >>H, '#endif /* GRPC_CORE_LIB_TRANSPORT_STATIC_METADATA_H */'
H.close()
C.close()