aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/codegen
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-03-28 12:43:02 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-03-28 12:43:02 -0700
commit3bd96959398d0671fee3785d4b2aee6042649b15 (patch)
treeabc5288b8a4a95b3fb1d5a922bf3b1b75c5bddbc /tools/codegen
parentc65ed870ed45522194c0fcb884c9098672ac35ba (diff)
parente5cc05b5c6cee7026a0d28d39925621451506820 (diff)
Merge github.com:grpc/grpc into idempotent
Diffstat (limited to 'tools/codegen')
-rw-r--r--tools/codegen/core/gen_hpack_tables.c6
-rwxr-xr-xtools/codegen/core/gen_load_balancing_proto.sh4
-rwxr-xr-xtools/codegen/core/gen_static_metadata.py26
3 files changed, 18 insertions, 18 deletions
diff --git a/tools/codegen/core/gen_hpack_tables.c b/tools/codegen/core/gen_hpack_tables.c
index bae4e4cd73..d809bd36e5 100644
--- a/tools/codegen/core/gen_hpack_tables.c
+++ b/tools/codegen/core/gen_hpack_tables.c
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -33,13 +33,13 @@
/* generates constant tables for hpack.c */
+#include <assert.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
-#include <assert.h>
#include <grpc/support/log.h>
-#include "src/core/transport/chttp2/huffsyms.h"
+#include "src/core/lib/transport/chttp2/huffsyms.h"
/*
* first byte LUT generation
diff --git a/tools/codegen/core/gen_load_balancing_proto.sh b/tools/codegen/core/gen_load_balancing_proto.sh
index fb6a468ee0..6a5363eeb3 100755
--- a/tools/codegen/core/gen_load_balancing_proto.sh
+++ b/tools/codegen/core/gen_load_balancing_proto.sh
@@ -82,7 +82,7 @@ fi
readonly GRPC_ROOT=$PWD
-OUTPUT_DIR="$GRPC_ROOT/src/core/proto/grpc/lb/v0"
+OUTPUT_DIR="$GRPC_ROOT/src/core/lib/proto/grpc/lb/v0"
if [ $# -eq 2 ]; then
mkdir -p "$2"
if [ $? != 0 ]; then
@@ -122,7 +122,7 @@ protoc \
"$(basename $1)"
readonly PROTO_BASENAME=$(basename $1 .proto)
-sed -i "s:$PROTO_BASENAME.pb.h:src/core/proto/grpc/lb/v0/$PROTO_BASENAME.pb.h:g" \
+sed -i "s:$PROTO_BASENAME.pb.h:src/core/lib/proto/grpc/lb/v0/$PROTO_BASENAME.pb.h:g" \
"$OUTPUT_DIR/$PROTO_BASENAME.pb.c"
# prepend copyright
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()