diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/grpc++/support/channel_arguments.h | 2 | ||||
-rw-r--r-- | include/grpc/impl/codegen/exec_ctx_fwd.h | 41 | ||||
-rw-r--r-- | include/grpc/impl/codegen/grpc_types.h | 6 | ||||
-rw-r--r-- | include/grpc/impl/codegen/slice.h | 4 |
4 files changed, 48 insertions, 5 deletions
diff --git a/include/grpc++/support/channel_arguments.h b/include/grpc++/support/channel_arguments.h index 571ab5d530..d43f7c61bd 100644 --- a/include/grpc++/support/channel_arguments.h +++ b/include/grpc++/support/channel_arguments.h @@ -127,7 +127,7 @@ class ChannelArguments { /// Default pointer argument operations. struct PointerVtableMembers { static void* Copy(void* in) { return in; } - static void Destroy(void* in) {} + static void Destroy(grpc_exec_ctx* exec_ctx, void* in) {} static int Compare(void* a, void* b) { if (a < b) return -1; if (a > b) return 1; diff --git a/include/grpc/impl/codegen/exec_ctx_fwd.h b/include/grpc/impl/codegen/exec_ctx_fwd.h new file mode 100644 index 0000000000..32edcedbb3 --- /dev/null +++ b/include/grpc/impl/codegen/exec_ctx_fwd.h @@ -0,0 +1,41 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_IMPL_CODEGEN_EXEC_CTX_FWD_H +#define GRPC_IMPL_CODEGEN_EXEC_CTX_FWD_H + +/* forward declaration for exec_ctx.h */ +struct grpc_exec_ctx; +typedef struct grpc_exec_ctx grpc_exec_ctx; + +#endif /* GRPC_IMPL_CODEGEN_EXEC_CTX_FWD_H */ diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index da1bd9dcbf..4307559860 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -34,10 +34,10 @@ #ifndef GRPC_IMPL_CODEGEN_GRPC_TYPES_H #define GRPC_IMPL_CODEGEN_GRPC_TYPES_H +#include <grpc/impl/codegen/compression_types.h> +#include <grpc/impl/codegen/exec_ctx_fwd.h> #include <grpc/impl/codegen/gpr_types.h> #include <grpc/impl/codegen/slice.h> - -#include <grpc/impl/codegen/compression_types.h> #include <grpc/impl/codegen/status.h> #include <stddef.h> @@ -96,7 +96,7 @@ typedef enum { typedef struct grpc_arg_pointer_vtable { void *(*copy)(void *p); - void (*destroy)(void *p); + void (*destroy)(grpc_exec_ctx *exec_ctx, void *p); int (*cmp)(void *p, void *q); } grpc_arg_pointer_vtable; diff --git a/include/grpc/impl/codegen/slice.h b/include/grpc/impl/codegen/slice.h index 774ba0e95d..4d4a86fa22 100644 --- a/include/grpc/impl/codegen/slice.h +++ b/include/grpc/impl/codegen/slice.h @@ -37,6 +37,8 @@ #include <stddef.h> #include <stdint.h> +#include <grpc/impl/codegen/exec_ctx_fwd.h> + /* Slice API A slice represents a contiguous reference counted array of bytes. @@ -57,7 +59,7 @@ grpc_slice_new, or grpc_slice_new_with_len instead. */ typedef struct grpc_slice_refcount { void (*ref)(void *); - void (*unref)(void *); + void (*unref)(grpc_exec_ctx *exec_ctx, void *); } grpc_slice_refcount; #define GRPC_SLICE_INLINED_SIZE (sizeof(size_t) + sizeof(uint8_t *) - 1) |