aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/surface
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2017-11-16 15:35:45 -0800
committerGravatar ncteisen <ncteisen@gmail.com>2017-11-17 14:08:57 -0800
commitadbfbd5977104987bee9f946f691683b756305e8 (patch)
treee35bcf97ddf6864de5beea7bb903552d4fdd5592 /src/core/lib/surface
parent90c8cf6acc698ddef1d2da3b205ad8d0014b52fa (diff)
Remove all extern C
Diffstat (limited to 'src/core/lib/surface')
-rw-r--r--src/core/lib/surface/alarm_internal.h8
-rw-r--r--src/core/lib/surface/api_trace.h8
-rw-r--r--src/core/lib/surface/call.h8
-rw-r--r--src/core/lib/surface/call_test_only.h8
-rw-r--r--src/core/lib/surface/channel.h8
-rw-r--r--src/core/lib/surface/channel_init.h8
-rw-r--r--src/core/lib/surface/channel_stack_type.h8
-rw-r--r--src/core/lib/surface/completion_queue.h8
-rw-r--r--src/core/lib/surface/completion_queue_factory.h8
-rw-r--r--src/core/lib/surface/event_string.h8
-rw-r--r--src/core/lib/surface/init.h8
-rw-r--r--src/core/lib/surface/lame_client.cc4
-rw-r--r--src/core/lib/surface/lame_client.h8
-rw-r--r--src/core/lib/surface/server.h8
-rw-r--r--src/core/lib/surface/validate_metadata.h8
15 files changed, 29 insertions, 87 deletions
diff --git a/src/core/lib/surface/alarm_internal.h b/src/core/lib/surface/alarm_internal.h
index 136b60547f..e4b9f34408 100644
--- a/src/core/lib/surface/alarm_internal.h
+++ b/src/core/lib/surface/alarm_internal.h
@@ -22,9 +22,7 @@
#include <grpc/support/log.h>
#include "src/core/lib/debug/trace.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+
#ifndef NDEBUG
@@ -41,8 +39,6 @@ extern grpc_tracer_flag grpc_trace_alarm_refcount;
#endif /* defined(NDEBUG) */
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SURFACE_ALARM_INTERNAL_H */
diff --git a/src/core/lib/surface/api_trace.h b/src/core/lib/surface/api_trace.h
index 105abdf629..a72d80eaae 100644
--- a/src/core/lib/surface/api_trace.h
+++ b/src/core/lib/surface/api_trace.h
@@ -22,9 +22,7 @@
#include <grpc/support/log.h>
#include "src/core/lib/debug/trace.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+
extern grpc_tracer_flag grpc_api_trace;
@@ -51,8 +49,6 @@ extern grpc_tracer_flag grpc_api_trace;
gpr_log(GPR_INFO, fmt GRPC_API_TRACE_UNWRAP##nargs args); \
}
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SURFACE_API_TRACE_H */
diff --git a/src/core/lib/surface/call.h b/src/core/lib/surface/call.h
index d4e596f84b..b30650781c 100644
--- a/src/core/lib/surface/call.h
+++ b/src/core/lib/surface/call.h
@@ -19,9 +19,7 @@
#ifndef GRPC_CORE_LIB_SURFACE_CALL_H
#define GRPC_CORE_LIB_SURFACE_CALL_H
-#ifdef __cplusplus
-extern "C" {
-#endif
+
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/channel/context.h"
@@ -115,8 +113,6 @@ grpc_compression_algorithm grpc_call_compression_for_level(
extern grpc_tracer_flag grpc_call_error_trace;
extern grpc_tracer_flag grpc_compression_trace;
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SURFACE_CALL_H */
diff --git a/src/core/lib/surface/call_test_only.h b/src/core/lib/surface/call_test_only.h
index 2ff4a487d5..c0815dc0f1 100644
--- a/src/core/lib/surface/call_test_only.h
+++ b/src/core/lib/surface/call_test_only.h
@@ -21,9 +21,7 @@
#include <grpc/grpc.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/** Return the compression algorithm from \a call.
*
@@ -54,8 +52,6 @@ uint32_t grpc_call_test_only_get_stream_encodings_accepted_by_peer(
grpc_stream_compression_algorithm
grpc_call_test_only_get_incoming_stream_encodings(grpc_call* call);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SURFACE_CALL_TEST_ONLY_H */
diff --git a/src/core/lib/surface/channel.h b/src/core/lib/surface/channel.h
index 063e685f6b..c2786b50a2 100644
--- a/src/core/lib/surface/channel.h
+++ b/src/core/lib/surface/channel.h
@@ -23,9 +23,7 @@
#include "src/core/lib/channel/channel_stack_builder.h"
#include "src/core/lib/surface/channel_stack_type.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+
grpc_channel* grpc_channel_create(grpc_exec_ctx* exec_ctx, const char* target,
const grpc_channel_args* args,
@@ -85,8 +83,6 @@ void grpc_channel_internal_unref(grpc_exec_ctx* exec_ctx,
grpc_compression_options grpc_channel_compression_options(
const grpc_channel* channel);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SURFACE_CHANNEL_H */
diff --git a/src/core/lib/surface/channel_init.h b/src/core/lib/surface/channel_init.h
index 9932781081..e09fe1fdb8 100644
--- a/src/core/lib/surface/channel_init.h
+++ b/src/core/lib/surface/channel_init.h
@@ -25,9 +25,7 @@
#define GRPC_CHANNEL_INIT_BUILTIN_PRIORITY 10000
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/// This module provides a way for plugins (and the grpc core library itself)
/// to register mutators for channel stacks.
@@ -74,8 +72,6 @@ bool grpc_channel_init_create_stack(grpc_exec_ctx* exec_ctx,
grpc_channel_stack_builder* builder,
grpc_channel_stack_type type);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SURFACE_CHANNEL_INIT_H */
diff --git a/src/core/lib/surface/channel_stack_type.h b/src/core/lib/surface/channel_stack_type.h
index feecd3aa44..5a26248dfe 100644
--- a/src/core/lib/surface/channel_stack_type.h
+++ b/src/core/lib/surface/channel_stack_type.h
@@ -21,9 +21,7 @@
#include <stdbool.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
typedef enum {
// normal top-half client channel with load-balancing, connection management
@@ -46,8 +44,6 @@ bool grpc_channel_stack_type_is_client(grpc_channel_stack_type type);
const char* grpc_channel_stack_type_string(grpc_channel_stack_type type);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SURFACE_CHANNEL_STACK_TYPE_H */
diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h
index 0ed9875f58..f4fa9a17f4 100644
--- a/src/core/lib/surface/completion_queue.h
+++ b/src/core/lib/surface/completion_queue.h
@@ -36,9 +36,7 @@ extern grpc_tracer_flag grpc_trace_pending_tags;
extern grpc_tracer_flag grpc_trace_cq_refcount;
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
+
typedef struct grpc_cq_completion {
gpr_mpscq_node node;
@@ -98,8 +96,6 @@ int grpc_get_cq_poll_num(grpc_completion_queue* cc);
grpc_completion_queue* grpc_completion_queue_create_internal(
grpc_cq_completion_type completion_type, grpc_cq_polling_type polling_type);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SURFACE_COMPLETION_QUEUE_H */
diff --git a/src/core/lib/surface/completion_queue_factory.h b/src/core/lib/surface/completion_queue_factory.h
index af8f3d60c3..74c1c18b24 100644
--- a/src/core/lib/surface/completion_queue_factory.h
+++ b/src/core/lib/surface/completion_queue_factory.h
@@ -22,9 +22,7 @@
#include <grpc/grpc.h>
#include "src/core/lib/surface/completion_queue.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+
typedef struct grpc_completion_queue_factory_vtable {
grpc_completion_queue* (*create)(const grpc_completion_queue_factory*,
@@ -37,8 +35,6 @@ struct grpc_completion_queue_factory {
grpc_completion_queue_factory_vtable* vtable;
};
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SURFACE_COMPLETION_QUEUE_FACTORY_H */
diff --git a/src/core/lib/surface/event_string.h b/src/core/lib/surface/event_string.h
index 4bdb11f35e..a763327862 100644
--- a/src/core/lib/surface/event_string.h
+++ b/src/core/lib/surface/event_string.h
@@ -21,15 +21,11 @@
#include <grpc/grpc.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+
/* Returns a string describing an event. Must be later freed with gpr_free() */
char* grpc_event_string(grpc_event* ev);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SURFACE_EVENT_STRING_H */
diff --git a/src/core/lib/surface/init.h b/src/core/lib/surface/init.h
index d429026327..c2969f972d 100644
--- a/src/core/lib/surface/init.h
+++ b/src/core/lib/surface/init.h
@@ -19,17 +19,13 @@
#ifndef GRPC_CORE_LIB_SURFACE_INIT_H
#define GRPC_CORE_LIB_SURFACE_INIT_H
-#ifdef __cplusplus
-extern "C" {
-#endif
+
void grpc_register_security_filters(void);
void grpc_security_pre_init(void);
void grpc_security_init(void);
int grpc_is_initialized(void);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SURFACE_INIT_H */
diff --git a/src/core/lib/surface/lame_client.cc b/src/core/lib/surface/lame_client.cc
index 7114a9f545..c32c9af50e 100644
--- a/src/core/lib/surface/lame_client.cc
+++ b/src/core/lib/surface/lame_client.cc
@@ -25,7 +25,6 @@
#include "src/core/lib/support/atomic.h"
-extern "C" {
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/support/string.h"
#include "src/core/lib/surface/api_trace.h"
@@ -33,7 +32,6 @@ extern "C" {
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/lame_client.h"
#include "src/core/lib/transport/static_metadata.h"
-}
namespace grpc_core {
@@ -146,7 +144,7 @@ static void destroy_channel_elem(grpc_exec_ctx* exec_ctx,
} // namespace grpc_core
-extern "C" const grpc_channel_filter grpc_lame_filter = {
+const grpc_channel_filter grpc_lame_filter = {
grpc_core::lame_start_transport_stream_op_batch,
grpc_core::lame_start_transport_op,
sizeof(grpc_core::CallData),
diff --git a/src/core/lib/surface/lame_client.h b/src/core/lib/surface/lame_client.h
index 2f6f9cd046..964e625f28 100644
--- a/src/core/lib/surface/lame_client.h
+++ b/src/core/lib/surface/lame_client.h
@@ -21,14 +21,10 @@
#include "src/core/lib/channel/channel_stack.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+
extern const grpc_channel_filter grpc_lame_filter;
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SURFACE_LAME_CLIENT_H */
diff --git a/src/core/lib/surface/server.h b/src/core/lib/surface/server.h
index e3c43f957d..e515e3099d 100644
--- a/src/core/lib/surface/server.h
+++ b/src/core/lib/surface/server.h
@@ -24,9 +24,7 @@
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/transport/transport.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+
extern const grpc_channel_filter grpc_server_top_filter;
@@ -58,8 +56,6 @@ int grpc_server_has_open_connections(grpc_server* server);
void grpc_server_get_pollsets(grpc_server* server, grpc_pollset*** pollsets,
size_t* pollset_count);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SURFACE_SERVER_H */
diff --git a/src/core/lib/surface/validate_metadata.h b/src/core/lib/surface/validate_metadata.h
index 9ca20692b5..30941b5f83 100644
--- a/src/core/lib/surface/validate_metadata.h
+++ b/src/core/lib/surface/validate_metadata.h
@@ -22,15 +22,11 @@
#include <grpc/slice.h>
#include "src/core/lib/iomgr/error.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+
grpc_error* grpc_validate_header_key_is_legal(grpc_slice slice);
grpc_error* grpc_validate_header_nonbin_value_is_legal(grpc_slice slice);
-#ifdef __cplusplus
-}
-#endif
+
#endif /* GRPC_CORE_LIB_SURFACE_VALIDATE_METADATA_H */