diff options
author | 2018-03-01 23:15:47 -0800 | |
---|---|---|
committer | 2018-03-02 11:38:32 -0800 | |
commit | ee013d25b3237b62185d1248e4ccc873a0d6be3e (patch) | |
tree | c7b101b055c3d32d168885b0aa736a554afb4c45 | |
parent | bf5237a723501c3a0c6324f7d8662b2759bfb816 (diff) |
Fix build and sanity
-rw-r--r-- | grpc.def | 2 | ||||
-rw-r--r-- | include/grpc/grpc.h | 10 | ||||
-rw-r--r-- | src/core/lib/channel/channel_tracer.cc | 2 | ||||
-rw-r--r-- | src/core/lib/channel/channel_tracer.h | 2 | ||||
-rw-r--r-- | src/core/lib/channel/object_registry.cc | 4 | ||||
-rw-r--r-- | src/core/lib/channel/object_registry.h | 2 | ||||
-rw-r--r-- | src/core/lib/surface/channel.cc | 2 | ||||
-rw-r--r-- | src/ruby/ext/grpc/rb_grpc_imports.generated.c | 4 | ||||
-rw-r--r-- | src/ruby/ext/grpc/rb_grpc_imports.generated.h | 6 | ||||
-rw-r--r-- | test/core/surface/public_headers_must_be_c89.c | 2 |
10 files changed, 29 insertions, 7 deletions
@@ -45,6 +45,8 @@ EXPORTS grpc_insecure_channel_create grpc_lame_client_channel_create grpc_channel_destroy + grpc_channel_get_trace + grpc_channel_get_uuid grpc_call_cancel grpc_call_cancel_with_status grpc_call_ref diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 2ad247abb1..e3b60a93a2 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -286,12 +286,12 @@ GRPCAPI grpc_channel* grpc_lame_client_channel_create( /** Close and destroy a grpc channel */ GRPCAPI void grpc_channel_destroy(grpc_channel* channel); -// Returns the JSON formatted channel trace for this channel. If recursive -// is true, it will render all of the trace for this channel's subchannels. -GRPCAPI char* grpc_channel_get_trace(grpc_channel* channel, bool recursive); +/** Returns the JSON formatted channel trace for this channel. If recursive + is non 0, it will render all of the trace for this channel's subchannels. */ +GRPCAPI char* grpc_channel_get_trace(grpc_channel* channel, int recursive); -// Returns the channel uuid, which can be used to look up its trace at a -// later time. +/** Returns the channel uuid, which can be used to look up its trace at a + later time. */ GRPCAPI intptr_t grpc_channel_get_uuid(grpc_channel* channel); /** Error handling for grpc_call diff --git a/src/core/lib/channel/channel_tracer.cc b/src/core/lib/channel/channel_tracer.cc index b1c76408a0..6e3cd35db9 100644 --- a/src/core/lib/channel/channel_tracer.cc +++ b/src/core/lib/channel/channel_tracer.cc @@ -16,6 +16,8 @@ * */ +#include <grpc/impl/codegen/port_platform.h> + #include "src/core/lib/channel/channel_tracer.h" #include <grpc/grpc.h> diff --git a/src/core/lib/channel/channel_tracer.h b/src/core/lib/channel/channel_tracer.h index e3ab32cfcd..e2a0442a26 100644 --- a/src/core/lib/channel/channel_tracer.h +++ b/src/core/lib/channel/channel_tracer.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_CHANNEL_CHANNEL_TRACER_H #define GRPC_CORE_LIB_CHANNEL_CHANNEL_TRACER_H +#include <grpc/impl/codegen/port_platform.h> + #include <grpc/grpc.h> #include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" diff --git a/src/core/lib/channel/object_registry.cc b/src/core/lib/channel/object_registry.cc index 108552a3c6..987c5366ca 100644 --- a/src/core/lib/channel/object_registry.cc +++ b/src/core/lib/channel/object_registry.cc @@ -16,8 +16,10 @@ * */ -#include "src/core/lib/channel/object_registry.h" +#include <grpc/impl/codegen/port_platform.h> + #include "src/core/lib/avl/avl.h" +#include "src/core/lib/channel/object_registry.h" #include "src/core/lib/gpr/useful.h" #include <grpc/support/alloc.h> diff --git a/src/core/lib/channel/object_registry.h b/src/core/lib/channel/object_registry.h index 2747522cc1..446d0cb41f 100644 --- a/src/core/lib/channel/object_registry.h +++ b/src/core/lib/channel/object_registry.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_CHANNEL_OBJECT_REGISTRY_H #define GRPC_CORE_LIB_CHANNEL_OBJECT_REGISTRY_H +#include <grpc/impl/codegen/port_platform.h> + #include <stdint.h> // TODO(ncteisen): convert this file to C++ diff --git a/src/core/lib/surface/channel.cc b/src/core/lib/surface/channel.cc index 18ff89d5bb..4813855de8 100644 --- a/src/core/lib/surface/channel.cc +++ b/src/core/lib/surface/channel.cc @@ -189,7 +189,7 @@ grpc_channel* grpc_channel_create_with_builder( return channel; } -char* grpc_channel_get_trace(grpc_channel* channel, bool recursive) { +char* grpc_channel_get_trace(grpc_channel* channel, int recursive) { return channel->tracer->RenderTrace(recursive); } diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index c045480ff4..1c042739a8 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -68,6 +68,8 @@ grpc_channel_get_info_type grpc_channel_get_info_import; grpc_insecure_channel_create_type grpc_insecure_channel_create_import; grpc_lame_client_channel_create_type grpc_lame_client_channel_create_import; grpc_channel_destroy_type grpc_channel_destroy_import; +grpc_channel_get_trace_type grpc_channel_get_trace_import; +grpc_channel_get_uuid_type grpc_channel_get_uuid_import; grpc_call_cancel_type grpc_call_cancel_import; grpc_call_cancel_with_status_type grpc_call_cancel_with_status_import; grpc_call_ref_type grpc_call_ref_import; @@ -304,6 +306,8 @@ void grpc_rb_load_imports(HMODULE library) { grpc_insecure_channel_create_import = (grpc_insecure_channel_create_type) GetProcAddress(library, "grpc_insecure_channel_create"); grpc_lame_client_channel_create_import = (grpc_lame_client_channel_create_type) GetProcAddress(library, "grpc_lame_client_channel_create"); grpc_channel_destroy_import = (grpc_channel_destroy_type) GetProcAddress(library, "grpc_channel_destroy"); + grpc_channel_get_trace_import = (grpc_channel_get_trace_type) GetProcAddress(library, "grpc_channel_get_trace"); + grpc_channel_get_uuid_import = (grpc_channel_get_uuid_type) GetProcAddress(library, "grpc_channel_get_uuid"); grpc_call_cancel_import = (grpc_call_cancel_type) GetProcAddress(library, "grpc_call_cancel"); grpc_call_cancel_with_status_import = (grpc_call_cancel_with_status_type) GetProcAddress(library, "grpc_call_cancel_with_status"); grpc_call_ref_import = (grpc_call_ref_type) GetProcAddress(library, "grpc_call_ref"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index 4f07452c68..2c640adb87 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -179,6 +179,12 @@ extern grpc_lame_client_channel_create_type grpc_lame_client_channel_create_impo typedef void(*grpc_channel_destroy_type)(grpc_channel* channel); extern grpc_channel_destroy_type grpc_channel_destroy_import; #define grpc_channel_destroy grpc_channel_destroy_import +typedef char*(*grpc_channel_get_trace_type)(grpc_channel* channel, bool recursive); +extern grpc_channel_get_trace_type grpc_channel_get_trace_import; +#define grpc_channel_get_trace grpc_channel_get_trace_import +typedef intptr_t(*grpc_channel_get_uuid_type)(grpc_channel* channel); +extern grpc_channel_get_uuid_type grpc_channel_get_uuid_import; +#define grpc_channel_get_uuid grpc_channel_get_uuid_import typedef grpc_call_error(*grpc_call_cancel_type)(grpc_call* call, void* reserved); extern grpc_call_cancel_type grpc_call_cancel_import; #define grpc_call_cancel grpc_call_cancel_import diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c index bd4dc0b60e..d858603e47 100644 --- a/test/core/surface/public_headers_must_be_c89.c +++ b/test/core/surface/public_headers_must_be_c89.c @@ -106,6 +106,8 @@ int main(int argc, char **argv) { printf("%lx", (unsigned long) grpc_insecure_channel_create); printf("%lx", (unsigned long) grpc_lame_client_channel_create); printf("%lx", (unsigned long) grpc_channel_destroy); + printf("%lx", (unsigned long) grpc_channel_get_trace); + printf("%lx", (unsigned long) grpc_channel_get_uuid); printf("%lx", (unsigned long) grpc_call_cancel); printf("%lx", (unsigned long) grpc_call_cancel_with_status); printf("%lx", (unsigned long) grpc_call_ref); |