Skip to content
Snippets Groups Projects
Commit 1ed15e28 authored by Nicolas "Pixel" Noble's avatar Nicolas "Pixel" Noble
Browse files

Properly exporting our C functions to C++.

Also properly including our headers from public headers using <>
parent 5ce0469d
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,10 @@
#include <grpc/grpc.h>
#include <grpc/support/slice_buffer.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum { GRPC_BB_SLICE_BUFFER } grpc_byte_buffer_type;
/* byte buffers are containers for messages passed in from the public api's */
......@@ -47,4 +51,8 @@ struct grpc_byte_buffer {
} data;
};
#ifdef __cplusplus
}
#endif
#endif /* GRPC_BYTE_BUFFER_H */
......@@ -37,6 +37,10 @@
#include <grpc/grpc.h>
#include <grpc/byte_buffer.h>
#ifdef __cplusplus
extern "C" {
#endif
struct grpc_byte_buffer_reader {
grpc_byte_buffer *buffer;
/* Different current objects correspond to different types of byte buffers */
......@@ -46,4 +50,8 @@ struct grpc_byte_buffer_reader {
} current;
};
#ifdef __cplusplus
}
#endif
#endif /* GRPC_BYTE_BUFFER_READER_H */
......@@ -40,6 +40,10 @@
#include <grpc/grpc.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Identify census functionality that can be enabled via census_initialize(). */
enum census_functions {
CENSUS_NONE = 0, /* Do not enable census. */
......@@ -92,4 +96,8 @@ int census_context_deserialize(const char *buffer, census_context **context);
* future census calls will result in undefined behavior. */
void census_context_destroy(census_context *context);
#ifdef __cplusplus
}
#endif
#endif /* CENSUS_CENSUS_H */
......@@ -34,8 +34,8 @@
#ifndef GRPC_GRPC_SECURITY_H
#define GRPC_GRPC_SECURITY_H
#include "grpc.h"
#include "status.h"
#include <grpc/grpc.h>
#include <grpc/status.h>
#ifdef __cplusplus
extern "C" {
......
......@@ -49,6 +49,9 @@ struct gpr_pthread_thread_local {
#define gpr_tls_init(tls) GPR_ASSERT(0 == pthread_key_create(&(tls)->key, NULL))
#define gpr_tls_destroy(tls) pthread_key_delete((tls)->key)
#ifdef __cplusplus
extern "C"
#endif
gpr_intptr gpr_tls_set(struct gpr_pthread_thread_local *tls, gpr_intptr value);
#define gpr_tls_get(tls) ((gpr_intptr)pthread_getspecific((tls)->key))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment