Fix build and sanity

reviewable/pr13883/r4
ncteisen 7 years ago
parent bf5237a723
commit ee013d25b3
  1. 2
      grpc.def
  2. 10
      include/grpc/grpc.h
  3. 2
      src/core/lib/channel/channel_tracer.cc
  4. 2
      src/core/lib/channel/channel_tracer.h
  5. 4
      src/core/lib/channel/object_registry.cc
  6. 2
      src/core/lib/channel/object_registry.h
  7. 2
      src/core/lib/surface/channel.cc
  8. 4
      src/ruby/ext/grpc/rb_grpc_imports.generated.c
  9. 6
      src/ruby/ext/grpc/rb_grpc_imports.generated.h
  10. 2
      test/core/surface/public_headers_must_be_c89.c

@ -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

@ -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

@ -16,6 +16,8 @@
*
*/
#include <grpc/impl/codegen/port_platform.h>
#include "src/core/lib/channel/channel_tracer.h"
#include <grpc/grpc.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"

@ -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>

@ -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++

@ -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);
}

@ -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");

@ -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

@ -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);

Loading…
Cancel
Save