diff options
author | 2017-11-30 17:47:36 -0800 | |
---|---|---|
committer | 2017-11-30 17:47:36 -0800 | |
commit | 36522e9f8008cade840b75f53164602719577bc6 (patch) | |
tree | dad5fcaa9e6e23923da427fbe36d7dbd6f288ba3 /src/core/lib/support | |
parent | ede1b2703d4058578b8b5830f006c89c9216521b (diff) | |
parent | 74a53c2440823e7b53741edba883ff1f4fb8f23a (diff) |
Merge master after no Extern C changes
Diffstat (limited to 'src/core/lib/support')
-rw-r--r-- | src/core/lib/support/arena.h | 8 | ||||
-rw-r--r-- | src/core/lib/support/env.h | 8 | ||||
-rw-r--r-- | src/core/lib/support/log.cc | 2 | ||||
-rw-r--r-- | src/core/lib/support/log_android.cc | 6 | ||||
-rw-r--r-- | src/core/lib/support/log_linux.cc | 2 | ||||
-rw-r--r-- | src/core/lib/support/log_posix.cc | 2 | ||||
-rw-r--r-- | src/core/lib/support/log_windows.cc | 2 | ||||
-rw-r--r-- | src/core/lib/support/mpscq.h | 7 | ||||
-rw-r--r-- | src/core/lib/support/murmur_hash.h | 8 | ||||
-rw-r--r-- | src/core/lib/support/string.h | 7 | ||||
-rw-r--r-- | src/core/lib/support/string_windows.h | 8 | ||||
-rw-r--r-- | src/core/lib/support/time_posix.cc | 2 | ||||
-rw-r--r-- | src/core/lib/support/time_precise.h | 8 | ||||
-rw-r--r-- | src/core/lib/support/time_windows.cc | 2 | ||||
-rw-r--r-- | src/core/lib/support/tmpfile.h | 8 |
15 files changed, 7 insertions, 73 deletions
diff --git a/src/core/lib/support/arena.h b/src/core/lib/support/arena.h index 4d43c56bb9..cfe973a036 100644 --- a/src/core/lib/support/arena.h +++ b/src/core/lib/support/arena.h @@ -27,10 +27,6 @@ #include <stddef.h> -#ifdef __cplusplus -extern "C" { -#endif - typedef struct gpr_arena gpr_arena; // Create an arena, with \a initial_size bytes in the first allocated buffer @@ -40,8 +36,4 @@ void* gpr_arena_alloc(gpr_arena* arena, size_t size); // Destroy an arena, returning the total number of bytes allocated size_t gpr_arena_destroy(gpr_arena* arena); -#ifdef __cplusplus -} -#endif - #endif /* GRPC_CORE_LIB_SUPPORT_ARENA_H */ diff --git a/src/core/lib/support/env.h b/src/core/lib/support/env.h index f50d7bcb7a..2452fd330d 100644 --- a/src/core/lib/support/env.h +++ b/src/core/lib/support/env.h @@ -21,10 +21,6 @@ #include <stdio.h> -#ifdef __cplusplus -extern "C" { -#endif - /* Env utility functions */ /* Gets the environment variable value with the specified name. @@ -42,8 +38,4 @@ void gpr_setenv(const char* name, const char* value); level of logging. So DO NOT USE THIS. */ const char* gpr_getenv_silent(const char* name, char** dst); -#ifdef __cplusplus -} -#endif - #endif /* GRPC_CORE_LIB_SUPPORT_ENV_H */ diff --git a/src/core/lib/support/log.cc b/src/core/lib/support/log.cc index e9adc6c349..2a40745e97 100644 --- a/src/core/lib/support/log.cc +++ b/src/core/lib/support/log.cc @@ -27,7 +27,7 @@ #include <stdio.h> #include <string.h> -extern "C" void gpr_default_log(gpr_log_func_args* args); +void gpr_default_log(gpr_log_func_args* args); static gpr_atm g_log_func = (gpr_atm)gpr_default_log; static gpr_atm g_min_severity_to_print = GPR_LOG_VERBOSITY_UNSET; diff --git a/src/core/lib/support/log_android.cc b/src/core/lib/support/log_android.cc index 73d24cd84d..0d3ac0fe52 100644 --- a/src/core/lib/support/log_android.cc +++ b/src/core/lib/support/log_android.cc @@ -39,8 +39,8 @@ static android_LogPriority severity_to_log_priority(gpr_log_severity severity) { return ANDROID_LOG_DEFAULT; } -extern "C" void gpr_log(const char* file, int line, gpr_log_severity severity, - const char* format, ...) { +void gpr_log(const char* file, int line, gpr_log_severity severity, + const char* format, ...) { char* message = NULL; va_list args; va_start(args, format); @@ -50,7 +50,7 @@ extern "C" void gpr_log(const char* file, int line, gpr_log_severity severity, free(message); } -extern "C" void gpr_default_log(gpr_log_func_args* args) { +void gpr_default_log(gpr_log_func_args* args) { const char* final_slash; const char* display_file; char* output = NULL; diff --git a/src/core/lib/support/log_linux.cc b/src/core/lib/support/log_linux.cc index e0e277fe87..6b1f1c71e4 100644 --- a/src/core/lib/support/log_linux.cc +++ b/src/core/lib/support/log_linux.cc @@ -56,7 +56,7 @@ void gpr_log(const char* file, int line, gpr_log_severity severity, free(message); } -extern "C" void gpr_default_log(gpr_log_func_args* args) { +void gpr_default_log(gpr_log_func_args* args) { const char* final_slash; char* prefix; const char* display_file; diff --git a/src/core/lib/support/log_posix.cc b/src/core/lib/support/log_posix.cc index e765f91390..9fab480a8d 100644 --- a/src/core/lib/support/log_posix.cc +++ b/src/core/lib/support/log_posix.cc @@ -56,7 +56,7 @@ void gpr_log(const char* file, int line, gpr_log_severity severity, gpr_free(allocated); } -extern "C" void gpr_default_log(gpr_log_func_args* args) { +void gpr_default_log(gpr_log_func_args* args) { const char* final_slash; const char* display_file; char time_buffer[64]; diff --git a/src/core/lib/support/log_windows.cc b/src/core/lib/support/log_windows.cc index d4481791e2..0013bf448f 100644 --- a/src/core/lib/support/log_windows.cc +++ b/src/core/lib/support/log_windows.cc @@ -65,7 +65,7 @@ void gpr_log(const char* file, int line, gpr_log_severity severity, } /* Simple starter implementation */ -extern "C" void gpr_default_log(gpr_log_func_args* args) { +void gpr_default_log(gpr_log_func_args* args) { const char* final_slash; const char* display_file; char time_buffer[64]; diff --git a/src/core/lib/support/mpscq.h b/src/core/lib/support/mpscq.h index fb22742050..648ead1f5b 100644 --- a/src/core/lib/support/mpscq.h +++ b/src/core/lib/support/mpscq.h @@ -24,10 +24,6 @@ #include <stdbool.h> #include <stddef.h> -#ifdef __cplusplus -extern "C" { -#endif - // Multiple-producer single-consumer lock free queue, based upon the // implementation from Dmitry Vyukov here: // http://www.1024cores.net/home/lock-free-algorithms/queues/intrusive-mpsc-node-based-queue @@ -84,8 +80,5 @@ gpr_mpscq_node* gpr_locked_mpscq_try_pop(gpr_locked_mpscq* q); // Pop a node. Returns NULL only if the queue was empty at some point after // calling this function gpr_mpscq_node* gpr_locked_mpscq_pop(gpr_locked_mpscq* q); -#ifdef __cplusplus -} -#endif #endif /* GRPC_CORE_LIB_SUPPORT_MPSCQ_H */ diff --git a/src/core/lib/support/murmur_hash.h b/src/core/lib/support/murmur_hash.h index d02bba6962..422770f103 100644 --- a/src/core/lib/support/murmur_hash.h +++ b/src/core/lib/support/murmur_hash.h @@ -23,15 +23,7 @@ #include <stddef.h> -#ifdef __cplusplus -extern "C" { -#endif - /* compute the hash of key (length len) */ uint32_t gpr_murmur_hash3(const void* key, size_t len, uint32_t seed); -#ifdef __cplusplus -} -#endif - #endif /* GRPC_CORE_LIB_SUPPORT_MURMUR_HASH_H */ diff --git a/src/core/lib/support/string.h b/src/core/lib/support/string.h index 0b18ffcec1..dd37f0b0e1 100644 --- a/src/core/lib/support/string.h +++ b/src/core/lib/support/string.h @@ -24,10 +24,6 @@ #include <grpc/support/port_platform.h> -#ifdef __cplusplus -extern "C" { -#endif - /* String utility functions */ /* Flags for gpr_dump function. */ @@ -109,8 +105,5 @@ void* gpr_memrchr(const void* s, int c, size_t n); /** Return true if lower(s) equals "true", "yes" or "1", otherwise false. */ bool gpr_is_true(const char* s); -#ifdef __cplusplus -} -#endif #endif /* GRPC_CORE_LIB_SUPPORT_STRING_H */ diff --git a/src/core/lib/support/string_windows.h b/src/core/lib/support/string_windows.h index 6771647581..7c7f31e7aa 100644 --- a/src/core/lib/support/string_windows.h +++ b/src/core/lib/support/string_windows.h @@ -21,10 +21,6 @@ #include <grpc/support/port_platform.h> -#ifdef __cplusplus -extern "C" { -#endif - #ifdef GPR_WINDOWS /* These allocate new strings using gpr_malloc to convert from and to utf-8. */ @@ -33,8 +29,4 @@ LPSTR gpr_tchar_to_char(LPCTSTR input); #endif /* GPR_WINDOWS */ -#ifdef __cplusplus -} -#endif - #endif /* GRPC_CORE_LIB_SUPPORT_STRING_WINDOWS_H */ diff --git a/src/core/lib/support/time_posix.cc b/src/core/lib/support/time_posix.cc index 7f65205800..47a849480f 100644 --- a/src/core/lib/support/time_posix.cc +++ b/src/core/lib/support/time_posix.cc @@ -127,9 +127,7 @@ static gpr_timespec now_impl(gpr_clock_type clock) { } #endif -extern "C" { gpr_timespec (*gpr_now_impl)(gpr_clock_type clock_type) = now_impl; -} #ifdef GPR_LOW_LEVEL_COUNTERS gpr_atm gpr_now_call_count; diff --git a/src/core/lib/support/time_precise.h b/src/core/lib/support/time_precise.h index 3befda3d86..35cd154dbd 100644 --- a/src/core/lib/support/time_precise.h +++ b/src/core/lib/support/time_precise.h @@ -21,15 +21,7 @@ #include <grpc/support/time.h> -#ifdef __cplusplus -extern "C" { -#endif - void gpr_precise_clock_init(void); void gpr_precise_clock_now(gpr_timespec* clk); -#ifdef __cplusplus -} -#endif - #endif /* GRPC_CORE_LIB_SUPPORT_TIME_PRECISE_H */ diff --git a/src/core/lib/support/time_windows.cc b/src/core/lib/support/time_windows.cc index 08c1b22964..fb17e5c079 100644 --- a/src/core/lib/support/time_windows.cc +++ b/src/core/lib/support/time_windows.cc @@ -68,9 +68,7 @@ static gpr_timespec now_impl(gpr_clock_type clock) { return now_tv; } -extern "C" { gpr_timespec (*gpr_now_impl)(gpr_clock_type clock_type) = now_impl; -} gpr_timespec gpr_now(gpr_clock_type clock_type) { return gpr_now_impl(clock_type); diff --git a/src/core/lib/support/tmpfile.h b/src/core/lib/support/tmpfile.h index 437d871786..c5ceda8675 100644 --- a/src/core/lib/support/tmpfile.h +++ b/src/core/lib/support/tmpfile.h @@ -21,18 +21,10 @@ #include <stdio.h> -#ifdef __cplusplus -extern "C" { -#endif - /* Creates a temporary file from a prefix. If tmp_filename is not NULL, *tmp_filename is assigned the name of the created file and it is the responsibility of the caller to gpr_free it unless an error occurs in which case it will be set to NULL. */ FILE* gpr_tmpfile(const char* prefix, char** tmp_filename); -#ifdef __cplusplus -} -#endif - #endif /* GRPC_CORE_LIB_SUPPORT_TMPFILE_H */ |