diff options
author | Craig Tiller <ctiller@google.com> | 2016-11-18 08:46:46 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-11-18 08:46:46 -0800 |
commit | 0160de9ae5c53222813c0030fc6d4a094d063d0a (patch) | |
tree | faa6b5ee4be7da5e53f869b9c49e689a2e846112 /test/core/transport/chttp2 | |
parent | b2348ba1db688751056faed43fb6235762feab6b (diff) |
Begin moving mdelem to be a value type
Diffstat (limited to 'test/core/transport/chttp2')
4 files changed, 7 insertions, 7 deletions
diff --git a/test/core/transport/chttp2/hpack_encoder_test.c b/test/core/transport/chttp2/hpack_encoder_test.c index 817a9636bf..862966cc38 100644 --- a/test/core/transport/chttp2/hpack_encoder_test.c +++ b/test/core/transport/chttp2/hpack_encoder_test.c @@ -195,7 +195,7 @@ static void verify_table_size_change_match_elem_size(grpc_exec_ctx *exec_ctx, const char *key, const char *value) { grpc_slice_buffer output; - grpc_mdelem *elem = + grpc_mdelem elem = grpc_mdelem_from_slices(exec_ctx, grpc_slice_from_copied_string(key), grpc_slice_from_copied_string(value)); size_t elem_size = grpc_mdelem_get_size_in_hpack_table(elem); diff --git a/test/core/transport/chttp2/hpack_parser_fuzzer_test.c b/test/core/transport/chttp2/hpack_parser_fuzzer_test.c index b3b3f7ac7c..cfa3c5c088 100644 --- a/test/core/transport/chttp2/hpack_parser_fuzzer_test.c +++ b/test/core/transport/chttp2/hpack_parser_fuzzer_test.c @@ -44,7 +44,7 @@ bool squelch = true; bool leak_check = true; -static void onhdr(grpc_exec_ctx *exec_ctx, void *ud, grpc_mdelem *md) { +static void onhdr(grpc_exec_ctx *exec_ctx, void *ud, grpc_mdelem md) { GRPC_MDELEM_UNREF(exec_ctx, md); } static void dont_log(gpr_log_func_args *args) {} diff --git a/test/core/transport/chttp2/hpack_parser_test.c b/test/core/transport/chttp2/hpack_parser_test.c index 6d2b4111c2..14c5de2440 100644 --- a/test/core/transport/chttp2/hpack_parser_test.c +++ b/test/core/transport/chttp2/hpack_parser_test.c @@ -45,7 +45,7 @@ typedef struct { va_list args; } test_checker; -static void onhdr(grpc_exec_ctx *exec_ctx, void *ud, grpc_mdelem *md) { +static void onhdr(grpc_exec_ctx *exec_ctx, void *ud, grpc_mdelem md) { const char *ekey, *evalue; test_checker *chk = ud; ekey = va_arg(chk->args, char *); diff --git a/test/core/transport/chttp2/hpack_table_test.c b/test/core/transport/chttp2/hpack_table_test.c index 695846399e..0de1e2729a 100644 --- a/test/core/transport/chttp2/hpack_table_test.c +++ b/test/core/transport/chttp2/hpack_table_test.c @@ -53,7 +53,7 @@ static void assert_str(const grpc_chttp2_hptbl *tbl, grpc_slice mdstr, static void assert_index(const grpc_chttp2_hptbl *tbl, uint32_t idx, const char *key, const char *value) { - grpc_mdelem *md = grpc_chttp2_hptbl_lookup(tbl, idx); + grpc_mdelem md = grpc_chttp2_hptbl_lookup(tbl, idx); assert_str(tbl, md->key, key); assert_str(tbl, md->value, value); } @@ -143,7 +143,7 @@ static void test_many_additions(void) { grpc_chttp2_hptbl_init(&exec_ctx, &tbl); for (i = 0; i < 100000; i++) { - grpc_mdelem *elem; + grpc_mdelem elem; gpr_asprintf(&key, "K:%d", i); gpr_asprintf(&value, "VALUE:%d", i); elem = @@ -171,7 +171,7 @@ static grpc_chttp2_hptbl_find_result find_simple(grpc_chttp2_hptbl *tbl, const char *key, const char *value) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_mdelem *md = + grpc_mdelem md = grpc_mdelem_from_slices(&exec_ctx, grpc_slice_from_copied_string(key), grpc_slice_from_copied_string(value)); grpc_chttp2_hptbl_find_result r = grpc_chttp2_hptbl_find(tbl, md); @@ -185,7 +185,7 @@ static void test_find(void) { grpc_chttp2_hptbl tbl; uint32_t i; char buffer[32]; - grpc_mdelem *elem; + grpc_mdelem elem; grpc_chttp2_hptbl_find_result r; LOG_TEST("test_find"); |