diff options
author | Craig Tiller <ctiller@google.com> | 2017-11-08 09:42:32 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-11-08 09:42:32 -0800 |
commit | 660d4aa2d281dbfbc6c3a3e3349b3e4b6a444285 (patch) | |
tree | 592cecc1d6670bb12b9af81c19cd3cb98cc0eeef /src/ruby/ext | |
parent | 48d26966646e910f7dd63d428ef831178ca9315e (diff) | |
parent | d9da7387b8057f3bd99a417a5ee905377bce9296 (diff) |
Merge github.com:grpc/grpc into tfix2
Diffstat (limited to 'src/ruby/ext')
-rw-r--r-- | src/ruby/ext/grpc/rb_byte_buffer.c | 10 | ||||
-rw-r--r-- | src/ruby/ext/grpc/rb_byte_buffer.h | 4 | ||||
-rw-r--r-- | src/ruby/ext/grpc/rb_call.c | 83 | ||||
-rw-r--r-- | src/ruby/ext/grpc/rb_call.h | 12 | ||||
-rw-r--r-- | src/ruby/ext/grpc/rb_call_credentials.c | 60 | ||||
-rw-r--r-- | src/ruby/ext/grpc/rb_channel.c | 174 | ||||
-rw-r--r-- | src/ruby/ext/grpc/rb_channel_credentials.c | 46 | ||||
-rw-r--r-- | src/ruby/ext/grpc/rb_completion_queue.c | 22 | ||||
-rw-r--r-- | src/ruby/ext/grpc/rb_completion_queue.h | 6 | ||||
-rw-r--r-- | src/ruby/ext/grpc/rb_compression_options.c | 40 | ||||
-rw-r--r-- | src/ruby/ext/grpc/rb_event_thread.c | 28 | ||||
-rw-r--r-- | src/ruby/ext/grpc/rb_event_thread.h | 2 | ||||
-rw-r--r-- | src/ruby/ext/grpc/rb_grpc.c | 14 | ||||
-rw-r--r-- | src/ruby/ext/grpc/rb_grpc_imports.generated.c | 2 | ||||
-rw-r--r-- | src/ruby/ext/grpc/rb_grpc_imports.generated.h | 449 | ||||
-rw-r--r-- | src/ruby/ext/grpc/rb_server.c | 46 | ||||
-rw-r--r-- | src/ruby/ext/grpc/rb_server_credentials.c | 26 |
17 files changed, 509 insertions, 515 deletions
diff --git a/src/ruby/ext/grpc/rb_byte_buffer.c b/src/ruby/ext/grpc/rb_byte_buffer.c index 8aa7a7eb03..e11c7e82a8 100644 --- a/src/ruby/ext/grpc/rb_byte_buffer.c +++ b/src/ruby/ext/grpc/rb_byte_buffer.c @@ -26,14 +26,14 @@ #include <grpc/slice.h> #include "rb_grpc.h" -grpc_byte_buffer *grpc_rb_s_to_byte_buffer(char *string, size_t length) { +grpc_byte_buffer* grpc_rb_s_to_byte_buffer(char* string, size_t length) { grpc_slice slice = grpc_slice_from_copied_buffer(string, length); - grpc_byte_buffer *buffer = grpc_raw_byte_buffer_create(&slice, 1); + grpc_byte_buffer* buffer = grpc_raw_byte_buffer_create(&slice, 1); grpc_slice_unref(slice); return buffer; } -VALUE grpc_rb_byte_buffer_to_s(grpc_byte_buffer *buffer) { +VALUE grpc_rb_byte_buffer_to_s(grpc_byte_buffer* buffer) { VALUE rb_string; grpc_byte_buffer_reader reader; grpc_slice next; @@ -46,7 +46,7 @@ VALUE grpc_rb_byte_buffer_to_s(grpc_byte_buffer *buffer) { return Qnil; } while (grpc_byte_buffer_reader_next(&reader, &next) != 0) { - rb_str_cat(rb_string, (const char *)GRPC_SLICE_START_PTR(next), + rb_str_cat(rb_string, (const char*)GRPC_SLICE_START_PTR(next), GRPC_SLICE_LENGTH(next)); grpc_slice_unref(next); } @@ -59,6 +59,6 @@ VALUE grpc_rb_slice_to_ruby_string(grpc_slice slice) { rb_raise(rb_eRuntimeError, "attempt to convert uninitialized grpc_slice to ruby string"); } - return rb_str_new((char *)GRPC_SLICE_START_PTR(slice), + return rb_str_new((char*)GRPC_SLICE_START_PTR(slice), GRPC_SLICE_LENGTH(slice)); } diff --git a/src/ruby/ext/grpc/rb_byte_buffer.h b/src/ruby/ext/grpc/rb_byte_buffer.h index c64a9900a0..9cb58aa85b 100644 --- a/src/ruby/ext/grpc/rb_byte_buffer.h +++ b/src/ruby/ext/grpc/rb_byte_buffer.h @@ -24,10 +24,10 @@ #include <grpc/grpc.h> /* Converts a char* with a length to a grpc_byte_buffer */ -grpc_byte_buffer *grpc_rb_s_to_byte_buffer(char *string, size_t length); +grpc_byte_buffer* grpc_rb_s_to_byte_buffer(char* string, size_t length); /* Converts a grpc_byte_buffer to a ruby string */ -VALUE grpc_rb_byte_buffer_to_s(grpc_byte_buffer *buffer); +VALUE grpc_rb_byte_buffer_to_s(grpc_byte_buffer* buffer); /* Converts a grpc_slice to a ruby string */ VALUE grpc_rb_slice_to_ruby_string(grpc_slice slice); diff --git a/src/ruby/ext/grpc/rb_call.c b/src/ruby/ext/grpc/rb_call.c index e920fc86c5..7f3ca2a8e7 100644 --- a/src/ruby/ext/grpc/rb_call.c +++ b/src/ruby/ext/grpc/rb_call.c @@ -24,7 +24,6 @@ #include <grpc/grpc.h> #include <grpc/impl/codegen/compression_types.h> #include <grpc/support/alloc.h> -#include <grpc/support/alloc.h> #include <grpc/support/log.h> #include "rb_byte_buffer.h" @@ -81,11 +80,11 @@ static VALUE sym_status; static VALUE sym_cancelled; typedef struct grpc_rb_call { - grpc_call *wrapped; - grpc_completion_queue *queue; + grpc_call* wrapped; + grpc_completion_queue* queue; } grpc_rb_call; -static void destroy_call(grpc_rb_call *call) { +static void destroy_call(grpc_rb_call* call) { /* Ensure that we only try to destroy the call once */ if (call->wrapped != NULL) { grpc_call_unref(call->wrapped); @@ -96,19 +95,19 @@ static void destroy_call(grpc_rb_call *call) { } /* Destroys a Call. */ -static void grpc_rb_call_destroy(void *p) { +static void grpc_rb_call_destroy(void* p) { if (p == NULL) { return; } - destroy_call((grpc_rb_call *)p); + destroy_call((grpc_rb_call*)p); xfree(p); } -static size_t md_ary_datasize(const void *p) { - const grpc_metadata_array *const ary = (grpc_metadata_array *)p; +static size_t md_ary_datasize(const void* p) { + const grpc_metadata_array* const ary = (grpc_metadata_array*)p; size_t i, datasize = sizeof(grpc_metadata_array); for (i = 0; i < ary->count; ++i) { - const grpc_metadata *const md = &ary->metadata[i]; + const grpc_metadata* const md = &ary->metadata[i]; datasize += GRPC_SLICE_LENGTH(md->key); datasize += GRPC_SLICE_LENGTH(md->value); } @@ -151,9 +150,9 @@ static const rb_data_type_t grpc_call_data_type = {"grpc_call", VALUE rb_error_code_details; /* Obtains the error detail string for given error code */ -const char *grpc_call_error_detail_of(grpc_call_error err) { +const char* grpc_call_error_detail_of(grpc_call_error err) { VALUE detail_ref = rb_hash_aref(rb_error_code_details, UINT2NUM(err)); - const char *detail = "unknown error code!"; + const char* detail = "unknown error code!"; if (detail_ref != Qnil) { detail = StringValueCStr(detail_ref); } @@ -163,7 +162,7 @@ const char *grpc_call_error_detail_of(grpc_call_error err) { /* Called by clients to cancel an RPC on the server. Can be called multiple times, from any thread. */ static VALUE grpc_rb_call_cancel(VALUE self) { - grpc_rb_call *call = NULL; + grpc_rb_call* call = NULL; grpc_call_error err; if (RTYPEDDATA_DATA(self) == NULL) { // This call has been closed @@ -187,7 +186,7 @@ static VALUE grpc_rb_call_cancel(VALUE self) { * message. */ static VALUE grpc_rb_call_cancel_with_status(VALUE self, VALUE status_code, VALUE details) { - grpc_rb_call *call = NULL; + grpc_rb_call* call = NULL; grpc_call_error err; if (RTYPEDDATA_DATA(self) == NULL) { // This call has been closed @@ -217,7 +216,7 @@ static VALUE grpc_rb_call_cancel_with_status(VALUE self, VALUE status_code, processed. */ static VALUE grpc_rb_call_close(VALUE self) { - grpc_rb_call *call = NULL; + grpc_rb_call* call = NULL; TypedData_Get_Struct(self, grpc_rb_call, &grpc_call_data_type, call); if (call != NULL) { destroy_call(call); @@ -230,8 +229,8 @@ static VALUE grpc_rb_call_close(VALUE self) { /* Called to obtain the peer that this call is connected to. */ static VALUE grpc_rb_call_get_peer(VALUE self) { VALUE res = Qnil; - grpc_rb_call *call = NULL; - char *peer = NULL; + grpc_rb_call* call = NULL; + char* peer = NULL; if (RTYPEDDATA_DATA(self) == NULL) { rb_raise(grpc_rb_eCallError, "Cannot get peer value on closed call"); return Qnil; @@ -246,9 +245,9 @@ static VALUE grpc_rb_call_get_peer(VALUE self) { /* Called to obtain the x509 cert of an authenticated peer. */ static VALUE grpc_rb_call_get_peer_cert(VALUE self) { - grpc_rb_call *call = NULL; + grpc_rb_call* call = NULL; VALUE res = Qnil; - grpc_auth_context *ctx = NULL; + grpc_auth_context* ctx = NULL; if (RTYPEDDATA_DATA(self) == NULL) { rb_raise(grpc_rb_eCallError, "Cannot get peer cert on closed call"); return Qnil; @@ -264,7 +263,7 @@ static VALUE grpc_rb_call_get_peer_cert(VALUE self) { { grpc_auth_property_iterator it = grpc_auth_context_find_properties_by_name( ctx, GRPC_X509_PEM_CERT_PROPERTY_NAME); - const grpc_auth_property *prop = grpc_auth_property_iterator_next(&it); + const grpc_auth_property* prop = grpc_auth_property_iterator_next(&it); if (prop == NULL) { return Qnil; } @@ -379,8 +378,8 @@ static VALUE grpc_rb_call_set_write_flag(VALUE self, VALUE write_flag) { Sets credentials on a call */ static VALUE grpc_rb_call_set_credentials(VALUE self, VALUE credentials) { - grpc_rb_call *call = NULL; - grpc_call_credentials *creds; + grpc_rb_call* call = NULL; + grpc_call_credentials* creds; grpc_call_error err; if (RTYPEDDATA_DATA(self) == NULL) { rb_raise(grpc_rb_eCallError, "Cannot set credentials of closed call"); @@ -407,12 +406,12 @@ static VALUE grpc_rb_call_set_credentials(VALUE self, VALUE credentials) { grpc_rb_md_ary_capacity_hash_cb */ static int grpc_rb_md_ary_fill_hash_cb(VALUE key, VALUE val, VALUE md_ary_obj) { - grpc_metadata_array *md_ary = NULL; + grpc_metadata_array* md_ary = NULL; long array_length; long i; grpc_slice key_slice; grpc_slice value_slice; - char *tmp_str = NULL; + char* tmp_str = NULL; if (TYPE(key) == T_SYMBOL) { key_slice = grpc_slice_from_static_string(rb_id2name(SYM2ID(key))); @@ -482,7 +481,7 @@ static int grpc_rb_md_ary_fill_hash_cb(VALUE key, VALUE val, VALUE md_ary_obj) { */ static int grpc_rb_md_ary_capacity_hash_cb(VALUE key, VALUE val, VALUE md_ary_obj) { - grpc_metadata_array *md_ary = NULL; + grpc_metadata_array* md_ary = NULL; (void)key; @@ -503,7 +502,7 @@ static int grpc_rb_md_ary_capacity_hash_cb(VALUE key, VALUE val, /* grpc_rb_md_ary_convert converts a ruby metadata hash into a grpc_metadata_array. */ -void grpc_rb_md_ary_convert(VALUE md_ary_hash, grpc_metadata_array *md_ary) { +void grpc_rb_md_ary_convert(VALUE md_ary_hash, grpc_metadata_array* md_ary) { VALUE md_ary_obj = Qnil; if (md_ary_hash == Qnil) { return; /* Do nothing if the expected has value is nil */ @@ -524,7 +523,7 @@ void grpc_rb_md_ary_convert(VALUE md_ary_hash, grpc_metadata_array *md_ary) { } /* Converts a metadata array to a hash. */ -VALUE grpc_rb_md_ary_to_h(grpc_metadata_array *md_ary) { +VALUE grpc_rb_md_ary_to_h(grpc_metadata_array* md_ary) { VALUE key = Qnil; VALUE new_ary = Qnil; VALUE value = Qnil; @@ -587,7 +586,7 @@ static int grpc_rb_call_check_op_keys_hash_cb(VALUE key, VALUE val, struct to the 'send_status_from_server' portion of an op. */ static void grpc_rb_op_update_status_from_server( - grpc_op *op, grpc_metadata_array *md_ary, grpc_slice *send_status_details, + grpc_op* op, grpc_metadata_array* md_ary, grpc_slice* send_status_details, VALUE status) { VALUE code = rb_struct_aref(status, sym_code); VALUE details = rb_struct_aref(status, sym_details); @@ -627,7 +626,7 @@ typedef struct run_batch_stack { grpc_metadata_array send_trailing_metadata; /* Data being received */ - grpc_byte_buffer *recv_message; + grpc_byte_buffer* recv_message; grpc_metadata_array recv_metadata; grpc_metadata_array recv_trailing_metadata; int recv_cancelled; @@ -639,7 +638,7 @@ typedef struct run_batch_stack { /* grpc_run_batch_stack_init ensures the run_batch_stack is properly * initialized */ -static void grpc_run_batch_stack_init(run_batch_stack *st, +static void grpc_run_batch_stack_init(run_batch_stack* st, unsigned write_flag) { MEMZERO(st, run_batch_stack, 1); grpc_metadata_array_init(&st->send_metadata); @@ -651,7 +650,7 @@ static void grpc_run_batch_stack_init(run_batch_stack *st, } void grpc_rb_metadata_array_destroy_including_entries( - grpc_metadata_array *array) { + grpc_metadata_array* array) { size_t i; if (array->metadata) { for (i = 0; i < array->count; i++) { @@ -664,7 +663,7 @@ void grpc_rb_metadata_array_destroy_including_entries( /* grpc_run_batch_stack_cleanup ensures the run_batch_stack is properly * cleaned up */ -static void grpc_run_batch_stack_cleanup(run_batch_stack *st) { +static void grpc_run_batch_stack_cleanup(run_batch_stack* st) { size_t i = 0; grpc_rb_metadata_array_destroy_including_entries(&st->send_metadata); @@ -693,7 +692,7 @@ static void grpc_run_batch_stack_cleanup(run_batch_stack *st) { /* grpc_run_batch_stack_fill_ops fills the run_batch_stack ops array from * ops_hash */ -static void grpc_run_batch_stack_fill_ops(run_batch_stack *st, VALUE ops_hash) { +static void grpc_run_batch_stack_fill_ops(run_batch_stack* st, VALUE ops_hash) { VALUE this_op = Qnil; VALUE this_value = Qnil; VALUE ops_ary = rb_ary_new(); @@ -760,7 +759,7 @@ static void grpc_run_batch_stack_fill_ops(run_batch_stack *st, VALUE ops_hash) { /* grpc_run_batch_stack_build_result fills constructs a ruby BatchResult struct after the results have run */ -static VALUE grpc_run_batch_stack_build_result(run_batch_stack *st) { +static VALUE grpc_run_batch_stack_build_result(run_batch_stack* st) { size_t i = 0; VALUE result = rb_struct_new(grpc_rb_sBatchResult, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil, NULL); @@ -823,14 +822,14 @@ static VALUE grpc_run_batch_stack_build_result(run_batch_stack *st) { Only one operation of each type can be active at once in any given batch */ static VALUE grpc_rb_call_run_batch(VALUE self, VALUE ops_hash) { - run_batch_stack *st = NULL; - grpc_rb_call *call = NULL; + run_batch_stack* st = NULL; + grpc_rb_call* call = NULL; grpc_event ev; grpc_call_error err; VALUE result = Qnil; VALUE rb_write_flag = rb_ivar_get(self, id_write_flag); unsigned write_flag = 0; - void *tag = (void *)&st; + void* tag = (void*)&st; if (RTYPEDDATA_DATA(self) == NULL) { rb_raise(grpc_rb_eCallError, "Cannot run batch on closed call"); @@ -997,8 +996,8 @@ void Init_grpc_call() { rb_define_method(grpc_rb_cCall, "metadata=", grpc_rb_call_set_metadata, 1); rb_define_method(grpc_rb_cCall, "trailing_metadata", grpc_rb_call_get_trailing_metadata, 0); - rb_define_method(grpc_rb_cCall, "trailing_metadata=", - grpc_rb_call_set_trailing_metadata, 1); + rb_define_method(grpc_rb_cCall, + "trailing_metadata=", grpc_rb_call_set_trailing_metadata, 1); rb_define_method(grpc_rb_cCall, "write_flag", grpc_rb_call_get_write_flag, 0); rb_define_method(grpc_rb_cCall, "write_flag=", grpc_rb_call_set_write_flag, 1); @@ -1035,15 +1034,15 @@ void Init_grpc_call() { } /* Gets the call from the ruby object */ -grpc_call *grpc_rb_get_wrapped_call(VALUE v) { - grpc_rb_call *call = NULL; +grpc_call* grpc_rb_get_wrapped_call(VALUE v) { + grpc_rb_call* call = NULL; TypedData_Get_Struct(v, grpc_rb_call, &grpc_call_data_type, call); return call->wrapped; } /* Obtains the wrapped object for a given call */ -VALUE grpc_rb_wrap_call(grpc_call *c, grpc_completion_queue *q) { - grpc_rb_call *wrapper; +VALUE grpc_rb_wrap_call(grpc_call* c, grpc_completion_queue* q) { + grpc_rb_call* wrapper; if (c == NULL || q == NULL) { return Qnil; } diff --git a/src/ruby/ext/grpc/rb_call.h b/src/ruby/ext/grpc/rb_call.h index bfe8035e0f..a2202eb8d3 100644 --- a/src/ruby/ext/grpc/rb_call.h +++ b/src/ruby/ext/grpc/rb_call.h @@ -24,24 +24,24 @@ #include <grpc/grpc.h> /* Gets the wrapped call from a VALUE. */ -grpc_call *grpc_rb_get_wrapped_call(VALUE v); +grpc_call* grpc_rb_get_wrapped_call(VALUE v); /* Gets the VALUE corresponding to given grpc_call. */ -VALUE grpc_rb_wrap_call(grpc_call *c, grpc_completion_queue *q); +VALUE grpc_rb_wrap_call(grpc_call* c, grpc_completion_queue* q); /* Provides the details of an call error */ -const char *grpc_call_error_detail_of(grpc_call_error err); +const char* grpc_call_error_detail_of(grpc_call_error err); /* Converts a metadata array to a hash. */ -VALUE grpc_rb_md_ary_to_h(grpc_metadata_array *md_ary); +VALUE grpc_rb_md_ary_to_h(grpc_metadata_array* md_ary); /* grpc_rb_md_ary_convert converts a ruby metadata hash into a grpc_metadata_array. */ -void grpc_rb_md_ary_convert(VALUE md_ary_hash, grpc_metadata_array *md_ary); +void grpc_rb_md_ary_convert(VALUE md_ary_hash, grpc_metadata_array* md_ary); void grpc_rb_metadata_array_destroy_including_entries( - grpc_metadata_array *md_ary); + grpc_metadata_array* md_ary); /* grpc_rb_eCallError is the ruby class of the exception thrown during call operations. */ diff --git a/src/ruby/ext/grpc/rb_call_credentials.c b/src/ruby/ext/grpc/rb_call_credentials.c index 4214a0811b..be32597592 100644 --- a/src/ruby/ext/grpc/rb_call_credentials.c +++ b/src/ruby/ext/grpc/rb_call_credentials.c @@ -44,13 +44,13 @@ typedef struct grpc_rb_call_credentials { VALUE mark; /* The actual credentials */ - grpc_call_credentials *wrapped; + grpc_call_credentials* wrapped; } grpc_rb_call_credentials; typedef struct callback_params { VALUE get_metadata; grpc_auth_metadata_context context; - void *user_data; + void* user_data; grpc_credentials_plugin_metadata_cb callback; } callback_params; @@ -82,8 +82,8 @@ static VALUE grpc_rb_call_credentials_callback_rescue(VALUE args, return result; } -static void grpc_rb_call_credentials_callback_with_gil(void *param) { - callback_params *const params = (callback_params *)param; +static void grpc_rb_call_credentials_callback_with_gil(void* param) { + callback_params* const params = (callback_params*)param; VALUE auth_uri = rb_str_new_cstr(params->context.service_url); /* Pass the arguments to the proc in a hash, which currently only has they key 'auth_uri' */ @@ -93,7 +93,7 @@ static void grpc_rb_call_credentials_callback_with_gil(void *param) { grpc_metadata_array md_ary; grpc_status_code status; VALUE details; - char *error_details; + char* error_details; grpc_metadata_array_init(&md_ary); rb_hash_aset(args, ID2SYM(rb_intern("jwt_aud_uri")), auth_uri); rb_ary_push(callback_args, params->get_metadata); @@ -113,34 +113,34 @@ static void grpc_rb_call_credentials_callback_with_gil(void *param) { } static int grpc_rb_call_credentials_plugin_get_metadata( - void *state, grpc_auth_metadata_context context, - grpc_credentials_plugin_metadata_cb cb, void *user_data, + void* state, grpc_auth_metadata_context context, + grpc_credentials_plugin_metadata_cb cb, void* user_data, grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX], - size_t *num_creds_md, grpc_status_code *status, - const char **error_details) { - callback_params *params = gpr_malloc(sizeof(callback_params)); + size_t* num_creds_md, grpc_status_code* status, + const char** error_details) { + callback_params* params = gpr_malloc(sizeof(callback_params)); params->get_metadata = (VALUE)state; params->context = context; params->user_data = user_data; params->callback = cb; grpc_rb_event_queue_enqueue(grpc_rb_call_credentials_callback_with_gil, - (void *)(params)); + (void*)(params)); return 0; // Async return. } -static void grpc_rb_call_credentials_plugin_destroy(void *state) { +static void grpc_rb_call_credentials_plugin_destroy(void* state) { (void)state; // Not sure what needs to be done here } /* Destroys the credentials instances. */ -static void grpc_rb_call_credentials_free(void *p) { - grpc_rb_call_credentials *wrapper; +static void grpc_rb_call_credentials_free(void* p) { + grpc_rb_call_credentials* wrapper; if (p == NULL) { return; } - wrapper = (grpc_rb_call_credentials *)p; + wrapper = (grpc_rb_call_credentials*)p; grpc_call_credentials_release(wrapper->wrapped); wrapper->wrapped = NULL; @@ -148,12 +148,12 @@ static void grpc_rb_call_credentials_free(void *p) { } /* Protects the mark object from GC */ -static void grpc_rb_call_credentials_mark(void *p) { - grpc_rb_call_credentials *wrapper = NULL; +static void grpc_rb_call_credentials_mark(void* p) { + grpc_rb_call_credentials* wrapper = NULL; if (p == NULL) { return; } - wrapper = (grpc_rb_call_credentials *)p; + wrapper = (grpc_rb_call_credentials*)p; if (wrapper->mark != Qnil) { rb_gc_mark(wrapper->mark); } @@ -175,7 +175,7 @@ static rb_data_type_t grpc_rb_call_credentials_data_type = { /* Allocates CallCredentials instances. Provides safe initial defaults for the instance fields. */ static VALUE grpc_rb_call_credentials_alloc(VALUE cls) { - grpc_rb_call_credentials *wrapper = ALLOC(grpc_rb_call_credentials); + grpc_rb_call_credentials* wrapper = ALLOC(grpc_rb_call_credentials); wrapper->wrapped = NULL; wrapper->mark = Qnil; return TypedData_Wrap_Struct(cls, &grpc_rb_call_credentials_data_type, @@ -185,9 +185,9 @@ static VALUE grpc_rb_call_credentials_alloc(VALUE cls) { /* Creates a wrapping object for a given call credentials. This should only be * called with grpc_call_credentials objects that are not already associated * with any Ruby object */ -VALUE grpc_rb_wrap_call_credentials(grpc_call_credentials *c, VALUE mark) { +VALUE grpc_rb_wrap_call_credentials(grpc_call_credentials* c, VALUE mark) { VALUE rb_wrapper; - grpc_rb_call_credentials *wrapper; + grpc_rb_call_credentials* wrapper; if (c == NULL) { return Qnil; } @@ -208,8 +208,8 @@ static ID id_callback; proc: (required) Proc that generates auth metadata Initializes CallCredential instances. */ static VALUE grpc_rb_call_credentials_init(VALUE self, VALUE proc) { - grpc_rb_call_credentials *wrapper = NULL; - grpc_call_credentials *creds = NULL; + grpc_rb_call_credentials* wrapper = NULL; + grpc_call_credentials* creds = NULL; grpc_metadata_credentials_plugin plugin; grpc_ruby_once_init(); @@ -223,7 +223,7 @@ static VALUE grpc_rb_call_credentials_init(VALUE self, VALUE proc) { rb_raise(rb_eTypeError, "Argument to CallCredentials#new must be a proc"); return Qnil; } - plugin.state = (void *)proc; + plugin.state = (void*)proc; plugin.type = ""; creds = grpc_metadata_credentials_create_from_plugin(plugin, NULL); @@ -239,11 +239,11 @@ static VALUE grpc_rb_call_credentials_init(VALUE self, VALUE proc) { return self; } -static VALUE grpc_rb_call_credentials_compose(int argc, VALUE *argv, +static VALUE grpc_rb_call_credentials_compose(int argc, VALUE* argv, VALUE self) { - grpc_call_credentials *creds; - grpc_call_credentials *other; - grpc_call_credentials *prev = NULL; + grpc_call_credentials* creds; + grpc_call_credentials* other; + grpc_call_credentials* prev = NULL; VALUE mark; if (argc == 0) { return self; @@ -282,8 +282,8 @@ void Init_grpc_call_credentials() { } /* Gets the wrapped grpc_call_credentials from the ruby wrapper */ -grpc_call_credentials *grpc_rb_get_wrapped_call_credentials(VALUE v) { - grpc_rb_call_credentials *wrapper = NULL; +grpc_call_credentials* grpc_rb_get_wrapped_call_credentials(VALUE v) { + grpc_rb_call_credentials* wrapper = NULL; TypedData_Get_Struct(v, grpc_rb_call_credentials, &grpc_rb_call_credentials_data_type, wrapper); return wrapper->wrapped; diff --git a/src/ruby/ext/grpc/rb_channel.c b/src/ruby/ext/grpc/rb_channel.c index f0af54d9e5..1d11a53aa7 100644 --- a/src/ruby/ext/grpc/rb_channel.c +++ b/src/ruby/ext/grpc/rb_channel.c @@ -54,9 +54,9 @@ static VALUE grpc_rb_cChannel = Qnil; static VALUE grpc_rb_cChannelArgs; typedef struct bg_watched_channel { - grpc_channel *channel; + grpc_channel* channel; // these fields must only be accessed under global_connection_polling_mu - struct bg_watched_channel *next; + struct bg_watched_channel* next; int channel_destroyed; int refcount; } bg_watched_channel; @@ -67,7 +67,7 @@ typedef struct grpc_rb_channel { /* The actual channel (protected in a wrapper to tell when it's safe to * destroy) */ - bg_watched_channel *bg_wrapped; + bg_watched_channel* bg_wrapped; } grpc_rb_channel; typedef enum { CONTINUOUS_WATCH, WATCH_STATE_API } watch_state_op_type; @@ -82,40 +82,40 @@ typedef struct watch_state_op { int called_back; } api_callback_args; struct { - bg_watched_channel *bg; + bg_watched_channel* bg; } continuous_watch_callback_args; } op; } watch_state_op; -static bg_watched_channel *bg_watched_channel_list_head = NULL; +static bg_watched_channel* bg_watched_channel_list_head = NULL; static void grpc_rb_channel_try_register_connection_polling( - bg_watched_channel *bg); -static void *wait_until_channel_polling_thread_started_no_gil(void *); -static void wait_until_channel_polling_thread_started_unblocking_func(void *); -static void *channel_init_try_register_connection_polling_without_gil( - void *arg); + bg_watched_channel* bg); +static void* wait_until_channel_polling_thread_started_no_gil(void*); +static void wait_until_channel_polling_thread_started_unblocking_func(void*); +static void* channel_init_try_register_connection_polling_without_gil( + void* arg); typedef struct channel_init_try_register_stack { - grpc_channel *channel; - grpc_rb_channel *wrapper; + grpc_channel* channel; + grpc_rb_channel* wrapper; } channel_init_try_register_stack; -static grpc_completion_queue *channel_polling_cq; +static grpc_completion_queue* channel_polling_cq; static gpr_mu global_connection_polling_mu; static gpr_cv global_connection_polling_cv; static int abort_channel_polling = 0; static int channel_polling_thread_started = 0; -static int bg_watched_channel_list_lookup(bg_watched_channel *bg); -static bg_watched_channel *bg_watched_channel_list_create_and_add( - grpc_channel *channel); -static void bg_watched_channel_list_free_and_remove(bg_watched_channel *bg); -static void run_poll_channels_loop_unblocking_func(void *arg); +static int bg_watched_channel_list_lookup(bg_watched_channel* bg); +static bg_watched_channel* bg_watched_channel_list_create_and_add( + grpc_channel* channel); +static void bg_watched_channel_list_free_and_remove(bg_watched_channel* bg); +static void run_poll_channels_loop_unblocking_func(void* arg); // Needs to be called under global_connection_polling_mu static void grpc_rb_channel_watch_connection_state_op_complete( - watch_state_op *op, int success) { + watch_state_op* op, int success) { GPR_ASSERT(!op->op.api_callback_args.called_back); op->op.api_callback_args.called_back = 1; op->op.api_callback_args.success = success; @@ -124,7 +124,7 @@ static void grpc_rb_channel_watch_connection_state_op_complete( } /* Avoids destroying a channel twice. */ -static void grpc_rb_channel_safe_destroy(bg_watched_channel *bg) { +static void grpc_rb_channel_safe_destroy(bg_watched_channel* bg) { gpr_mu_lock(&global_connection_polling_mu); GPR_ASSERT(bg_watched_channel_list_lookup(bg)); if (!bg->channel_destroyed) { @@ -138,18 +138,18 @@ static void grpc_rb_channel_safe_destroy(bg_watched_channel *bg) { gpr_mu_unlock(&global_connection_polling_mu); } -static void *channel_safe_destroy_without_gil(void *arg) { - grpc_rb_channel_safe_destroy((bg_watched_channel *)arg); +static void* channel_safe_destroy_without_gil(void* arg) { + grpc_rb_channel_safe_destroy((bg_watched_channel*)arg); return NULL; } /* Destroys Channel instances. */ -static void grpc_rb_channel_free(void *p) { - grpc_rb_channel *ch = NULL; +static void grpc_rb_channel_free(void* p) { + grpc_rb_channel* ch = NULL; if (p == NULL) { return; }; - ch = (grpc_rb_channel *)p; + ch = (grpc_rb_channel*)p; if (ch->bg_wrapped != NULL) { /* assumption made here: it's ok to directly gpr_mu_lock the global @@ -164,12 +164,12 @@ static void grpc_rb_channel_free(void *p) { } /* Protects the mark object from GC */ -static void grpc_rb_channel_mark(void *p) { - grpc_rb_channel *channel = NULL; +static void grpc_rb_channel_mark(void* p) { + grpc_rb_channel* channel = NULL; if (p == NULL) { return; } - channel = (grpc_rb_channel *)p; + channel = (grpc_rb_channel*)p; if (channel->credentials != Qnil) { rb_gc_mark(channel->credentials); } @@ -189,7 +189,7 @@ static rb_data_type_t grpc_channel_data_type = {"grpc_channel", /* Allocates grpc_rb_channel instances. */ static VALUE grpc_rb_channel_alloc(VALUE cls) { - grpc_rb_channel *wrapper = ALLOC(grpc_rb_channel); + grpc_rb_channel* wrapper = ALLOC(grpc_rb_channel); wrapper->bg_wrapped = NULL; wrapper->credentials = Qnil; return TypedData_Wrap_Struct(cls, &grpc_channel_data_type, wrapper); @@ -203,14 +203,14 @@ static VALUE grpc_rb_channel_alloc(VALUE cls) { secure_channel = Channel:new("myhost:443", {'arg1': 'value1'}, creds) Creates channel instances. */ -static VALUE grpc_rb_channel_init(int argc, VALUE *argv, VALUE self) { +static VALUE grpc_rb_channel_init(int argc, VALUE* argv, VALUE self) { VALUE channel_args = Qnil; VALUE credentials = Qnil; VALUE target = Qnil; - grpc_rb_channel *wrapper = NULL; - grpc_channel *ch = NULL; - grpc_channel_credentials *creds = NULL; - char *target_chars = NULL; + grpc_rb_channel* wrapper = NULL; + grpc_channel* ch = NULL; + grpc_channel_credentials* creds = NULL; + char* target_chars = NULL; grpc_channel_args args; channel_init_try_register_stack stack; int stop_waiting_for_thread_start = 0; @@ -262,13 +262,13 @@ static VALUE grpc_rb_channel_init(int argc, VALUE *argv, VALUE self) { } typedef struct get_state_stack { - bg_watched_channel *bg; + bg_watched_channel* bg; int try_to_connect; int out; } get_state_stack; -static void *get_state_without_gil(void *arg) { - get_state_stack *stack = (get_state_stack *)arg; +static void* get_state_without_gil(void* arg) { + get_state_stack* stack = (get_state_stack*)arg; gpr_mu_lock(&global_connection_polling_mu); GPR_ASSERT(abort_channel_polling || channel_polling_thread_started); @@ -292,10 +292,10 @@ static void *get_state_without_gil(void *arg) { constants defined in GRPC::Core::ConnectivityStates. It also tries to connect if the chennel is idle in the second form. */ -static VALUE grpc_rb_channel_get_connectivity_state(int argc, VALUE *argv, +static VALUE grpc_rb_channel_get_connectivity_state(int argc, VALUE* argv, VALUE self) { VALUE try_to_connect_param = Qfalse; - grpc_rb_channel *wrapper = NULL; + grpc_rb_channel* wrapper = NULL; get_state_stack stack; /* "01" == 0 mandatory args, 1 (try_to_connect) is optional */ @@ -315,22 +315,22 @@ static VALUE grpc_rb_channel_get_connectivity_state(int argc, VALUE *argv, } typedef struct watch_state_stack { - grpc_channel *channel; + grpc_channel* channel; gpr_timespec deadline; int last_state; } watch_state_stack; -static void *wait_for_watch_state_op_complete_without_gvl(void *arg) { - watch_state_stack *stack = (watch_state_stack *)arg; - watch_state_op *op = NULL; - void *success = (void *)0; +static void* wait_for_watch_state_op_complete_without_gvl(void* arg) { + watch_state_stack* stack = (watch_state_stack*)arg; + watch_state_op* op = NULL; + void* success = (void*)0; gpr_mu_lock(&global_connection_polling_mu); // its unsafe to do a "watch" after "channel polling abort" because the cq has // been shut down. if (abort_channel_polling) { gpr_mu_unlock(&global_connection_polling_mu); - return (void *)0; + return (void*)0; } op = gpr_zalloc(sizeof(watch_state_op)); op->op_type = WATCH_STATE_API; @@ -343,15 +343,15 @@ static void *wait_for_watch_state_op_complete_without_gvl(void *arg) { gpr_inf_future(GPR_CLOCK_REALTIME)); } if (op->op.api_callback_args.success) { - success = (void *)1; + success = (void*)1; } gpr_free(op); gpr_mu_unlock(&global_connection_polling_mu); return success; } -static void wait_for_watch_state_op_complete_unblocking_func(void *arg) { - bg_watched_channel *bg = (bg_watched_channel *)arg; +static void wait_for_watch_state_op_complete_unblocking_func(void* arg) { + bg_watched_channel* bg = (bg_watched_channel*)arg; gpr_mu_lock(&global_connection_polling_mu); if (!bg->channel_destroyed) { grpc_channel_destroy(bg->channel); @@ -370,9 +370,9 @@ static void wait_for_watch_state_op_complete_unblocking_func(void *arg) { static VALUE grpc_rb_channel_watch_connectivity_state(VALUE self, VALUE last_state, VALUE deadline) { - grpc_rb_channel *wrapper = NULL; + grpc_rb_channel* wrapper = NULL; watch_state_stack stack; - void *op_success = 0; + void* op_success = 0; TypedData_Get_Struct(self, grpc_rb_channel, &grpc_channel_data_type, wrapper); @@ -405,15 +405,15 @@ static VALUE grpc_rb_channel_create_call(VALUE self, VALUE parent, VALUE mask, VALUE method, VALUE host, VALUE deadline) { VALUE res = Qnil; - grpc_rb_channel *wrapper = NULL; - grpc_call *call = NULL; - grpc_call *parent_call = NULL; - grpc_completion_queue *cq = NULL; + grpc_rb_channel* wrapper = NULL; + grpc_call* call = NULL; + grpc_call* parent_call = NULL; + grpc_completion_queue* cq = NULL; int flags = GRPC_PROPAGATE_DEFAULTS; grpc_slice method_slice; grpc_slice host_slice; - grpc_slice *host_slice_ptr = NULL; - char *tmp_str = NULL; + grpc_slice* host_slice_ptr = NULL; + char* tmp_str = NULL; if (host != Qnil) { host_slice = @@ -466,7 +466,7 @@ static VALUE grpc_rb_channel_create_call(VALUE self, VALUE parent, VALUE mask, /* Note this is an API-level call; a wrapped channel's finalizer doesn't call * this */ static VALUE grpc_rb_channel_destroy(VALUE self) { - grpc_rb_channel *wrapper = NULL; + grpc_rb_channel* wrapper = NULL; TypedData_Get_Struct(self, grpc_rb_channel, &grpc_channel_data_type, wrapper); if (wrapper->bg_wrapped != NULL) { @@ -480,9 +480,9 @@ static VALUE grpc_rb_channel_destroy(VALUE self) { /* Called to obtain the target that this channel accesses. */ static VALUE grpc_rb_channel_get_target(VALUE self) { - grpc_rb_channel *wrapper = NULL; + grpc_rb_channel* wrapper = NULL; VALUE res = Qnil; - char *target = NULL; + char* target = NULL; TypedData_Get_Struct(self, grpc_rb_channel, &grpc_channel_data_type, wrapper); target = grpc_channel_get_target(wrapper->bg_wrapped->channel); @@ -493,8 +493,8 @@ static VALUE grpc_rb_channel_get_target(VALUE self) { } /* Needs to be called under global_connection_polling_mu */ -static int bg_watched_channel_list_lookup(bg_watched_channel *target) { - bg_watched_channel *cur = bg_watched_channel_list_head; +static int bg_watched_channel_list_lookup(bg_watched_channel* target) { + bg_watched_channel* cur = bg_watched_channel_list_head; while (cur != NULL) { if (cur == target) { @@ -507,9 +507,9 @@ static int bg_watched_channel_list_lookup(bg_watched_channel *target) { } /* Needs to be called under global_connection_polling_mu */ -static bg_watched_channel *bg_watched_channel_list_create_and_add( - grpc_channel *channel) { - bg_watched_channel *watched = gpr_zalloc(sizeof(bg_watched_channel)); +static bg_watched_channel* bg_watched_channel_list_create_and_add( + grpc_channel* channel) { + bg_watched_channel* watched = gpr_zalloc(sizeof(bg_watched_channel)); watched->channel = channel; watched->next = bg_watched_channel_list_head; @@ -520,8 +520,8 @@ static bg_watched_channel *bg_watched_channel_list_create_and_add( /* Needs to be called under global_connection_polling_mu */ static void bg_watched_channel_list_free_and_remove( - bg_watched_channel *target) { - bg_watched_channel *bg = NULL; + bg_watched_channel* target) { + bg_watched_channel* bg = NULL; GPR_ASSERT(bg_watched_channel_list_lookup(target)); GPR_ASSERT(target->channel_destroyed && target->refcount == 0); @@ -544,10 +544,10 @@ static void bg_watched_channel_list_free_and_remove( /* Initialize a grpc_rb_channel's "protected grpc_channel" and try to push * it onto the background thread for constant watches. */ -static void *channel_init_try_register_connection_polling_without_gil( - void *arg) { - channel_init_try_register_stack *stack = - (channel_init_try_register_stack *)arg; +static void* channel_init_try_register_connection_polling_without_gil( + void* arg) { + channel_init_try_register_stack* stack = + (channel_init_try_register_stack*)arg; gpr_mu_lock(&global_connection_polling_mu); stack->wrapper->bg_wrapped = @@ -559,9 +559,9 @@ static void *channel_init_try_register_connection_polling_without_gil( // Needs to be called under global_connection_poolling_mu static void grpc_rb_channel_try_register_connection_polling( - bg_watched_channel *bg) { + bg_watched_channel* bg) { grpc_connectivity_state conn_state; - watch_state_op *op = NULL; + watch_state_op* op = NULL; GPR_ASSERT(channel_polling_thread_started || abort_channel_polling); @@ -597,10 +597,10 @@ static void grpc_rb_channel_try_register_connection_polling( // indicates process shutdown. // In the worst case, this stops polling channel connectivity // early and falls back to current behavior. -static void *run_poll_channels_loop_no_gil(void *arg) { +static void* run_poll_channels_loop_no_gil(void* arg) { grpc_event event; - watch_state_op *op = NULL; - bg_watched_channel *bg = NULL; + watch_state_op* op = NULL; + bg_watched_channel* bg = NULL; (void)arg; gpr_log(GPR_DEBUG, "GRPC_RUBY: run_poll_channels_loop_no_gil - begin"); @@ -618,15 +618,15 @@ static void *run_poll_channels_loop_no_gil(void *arg) { } gpr_mu_lock(&global_connection_polling_mu); if (event.type == GRPC_OP_COMPLETE) { - op = (watch_state_op *)event.tag; + op = (watch_state_op*)event.tag; if (op->op_type == CONTINUOUS_WATCH) { - bg = (bg_watched_channel *)op->op.continuous_watch_callback_args.bg; + bg = (bg_watched_channel*)op->op.continuous_watch_callback_args.bg; bg->refcount--; grpc_rb_channel_try_register_connection_polling(bg); gpr_free(op); } else if (op->op_type == WATCH_STATE_API) { grpc_rb_channel_watch_connection_state_op_complete( - (watch_state_op *)event.tag, event.success); + (watch_state_op*)event.tag, event.success); } else { GPR_ASSERT(0); } @@ -641,8 +641,8 @@ static void *run_poll_channels_loop_no_gil(void *arg) { } // Notify the channel polling loop to cleanup and shutdown. -static void run_poll_channels_loop_unblocking_func(void *arg) { - bg_watched_channel *bg = NULL; +static void run_poll_channels_loop_unblocking_func(void* arg) { + bg_watched_channel* bg = NULL; (void)arg; gpr_mu_lock(&global_connection_polling_mu); @@ -686,8 +686,8 @@ static VALUE run_poll_channels_loop(VALUE arg) { return Qnil; } -static void *wait_until_channel_polling_thread_started_no_gil(void *arg) { - int *stop_waiting = (int *)arg; +static void* wait_until_channel_polling_thread_started_no_gil(void* arg) { + int* stop_waiting = (int*)arg; gpr_log(GPR_DEBUG, "GRPC_RUBY: wait for channel polling thread to start"); gpr_mu_lock(&global_connection_polling_mu); while (!channel_polling_thread_started && !abort_channel_polling && @@ -701,8 +701,8 @@ static void *wait_until_channel_polling_thread_started_no_gil(void *arg) { } static void wait_until_channel_polling_thread_started_unblocking_func( - void *arg) { - int *stop_waiting = (int *)arg; + void* arg) { + int* stop_waiting = (int*)arg; gpr_mu_lock(&global_connection_polling_mu); gpr_log(GPR_DEBUG, "GRPC_RUBY: interrupt wait for channel polling thread to start"); @@ -711,7 +711,7 @@ static void wait_until_channel_polling_thread_started_unblocking_func( gpr_mu_unlock(&global_connection_polling_mu); } -static void *set_abort_channel_polling_without_gil(void *arg) { +static void* set_abort_channel_polling_without_gil(void* arg) { (void)arg; gpr_mu_lock(&global_connection_polling_mu); abort_channel_polling = 1; @@ -822,8 +822,8 @@ void Init_grpc_channel() { } /* Gets the wrapped channel from the ruby wrapper */ -grpc_channel *grpc_rb_get_wrapped_channel(VALUE v) { - grpc_rb_channel *wrapper = NULL; +grpc_channel* grpc_rb_get_wrapped_channel(VALUE v) { + grpc_rb_channel* wrapper = NULL; TypedData_Get_Struct(v, grpc_rb_channel, &grpc_channel_data_type, wrapper); return wrapper->bg_wrapped->channel; } diff --git a/src/ruby/ext/grpc/rb_channel_credentials.c b/src/ruby/ext/grpc/rb_channel_credentials.c index 83601ca694..b23a32caf1 100644 --- a/src/ruby/ext/grpc/rb_channel_credentials.c +++ b/src/ruby/ext/grpc/rb_channel_credentials.c @@ -35,7 +35,7 @@ grpc_channel_credentials. */ static VALUE grpc_rb_cChannelCredentials = Qnil; -static char *pem_root_certs = NULL; +static char* pem_root_certs = NULL; /* grpc_rb_channel_credentials wraps a grpc_channel_credentials. It provides a * mark object that is used to hold references to any objects used to create @@ -45,16 +45,16 @@ typedef struct grpc_rb_channel_credentials { VALUE mark; /* The actual credentials */ - grpc_channel_credentials *wrapped; + grpc_channel_credentials* wrapped; } grpc_rb_channel_credentials; /* Destroys the credentials instances. */ -static void grpc_rb_channel_credentials_free(void *p) { - grpc_rb_channel_credentials *wrapper = NULL; +static void grpc_rb_channel_credentials_free(void* p) { + grpc_rb_channel_credentials* wrapper = NULL; if (p == NULL) { return; }; - wrapper = (grpc_rb_channel_credentials *)p; + wrapper = (grpc_rb_channel_credentials*)p; grpc_channel_credentials_release(wrapper->wrapped); wrapper->wrapped = NULL; @@ -62,12 +62,12 @@ static void grpc_rb_channel_credentials_free(void *p) { } /* Protects the mark object from GC */ -static void grpc_rb_channel_credentials_mark(void *p) { - grpc_rb_channel_credentials *wrapper = NULL; +static void grpc_rb_channel_credentials_mark(void* p) { + grpc_rb_channel_credentials* wrapper = NULL; if (p == NULL) { return; } - wrapper = (grpc_rb_channel_credentials *)p; + wrapper = (grpc_rb_channel_credentials*)p; if (wrapper->mark != Qnil) { rb_gc_mark(wrapper->mark); @@ -90,7 +90,7 @@ static rb_data_type_t grpc_rb_channel_credentials_data_type = { /* Allocates ChannelCredential instances. Provides safe initial defaults for the instance fields. */ static VALUE grpc_rb_channel_credentials_alloc(VALUE cls) { - grpc_rb_channel_credentials *wrapper = ALLOC(grpc_rb_channel_credentials); + grpc_rb_channel_credentials* wrapper = ALLOC(grpc_rb_channel_credentials); wrapper->wrapped = NULL; wrapper->mark = Qnil; return TypedData_Wrap_Struct(cls, &grpc_rb_channel_credentials_data_type, @@ -100,10 +100,10 @@ static VALUE grpc_rb_channel_credentials_alloc(VALUE cls) { /* Creates a wrapping object for a given channel credentials. This should only * be called with grpc_channel_credentials objects that are not already * associated with any Ruby object. */ -VALUE grpc_rb_wrap_channel_credentials(grpc_channel_credentials *c, +VALUE grpc_rb_wrap_channel_credentials(grpc_channel_credentials* c, VALUE mark) { VALUE rb_wrapper; - grpc_rb_channel_credentials *wrapper; + grpc_rb_channel_credentials* wrapper; if (c == NULL) { return Qnil; } @@ -136,15 +136,15 @@ static ID id_pem_cert_chain; pem_private_key: (optional) PEM encoding of the client's private key pem_cert_chain: (optional) PEM encoding of the client's cert chain Initializes Credential instances. */ -static VALUE grpc_rb_channel_credentials_init(int argc, VALUE *argv, +static VALUE grpc_rb_channel_credentials_init(int argc, VALUE* argv, VALUE self) { VALUE pem_root_certs = Qnil; VALUE pem_private_key = Qnil; VALUE pem_cert_chain = Qnil; - grpc_rb_channel_credentials *wrapper = NULL; - grpc_channel_credentials *creds = NULL; + grpc_rb_channel_credentials* wrapper = NULL; + grpc_channel_credentials* creds = NULL; grpc_ssl_pem_key_cert_pair key_cert_pair; - const char *pem_root_certs_cstr = NULL; + const char* pem_root_certs_cstr = NULL; MEMZERO(&key_cert_pair, grpc_ssl_pem_key_cert_pair, 1); grpc_ruby_once_init(); @@ -180,11 +180,11 @@ static VALUE grpc_rb_channel_credentials_init(int argc, VALUE *argv, return self; } -static VALUE grpc_rb_channel_credentials_compose(int argc, VALUE *argv, +static VALUE grpc_rb_channel_credentials_compose(int argc, VALUE* argv, VALUE self) { - grpc_channel_credentials *creds; - grpc_call_credentials *other; - grpc_channel_credentials *prev = NULL; + grpc_channel_credentials* creds; + grpc_call_credentials* other; + grpc_channel_credentials* prev = NULL; VALUE mark; if (argc == 0) { return self; @@ -210,7 +210,7 @@ static VALUE grpc_rb_channel_credentials_compose(int argc, VALUE *argv, } static grpc_ssl_roots_override_result get_ssl_roots_override( - char **pem_root_certs_ptr) { + char** pem_root_certs_ptr) { *pem_root_certs_ptr = pem_root_certs; if (pem_root_certs == NULL) { return GRPC_SSL_ROOTS_OVERRIDE_FAIL; @@ -220,7 +220,7 @@ static grpc_ssl_roots_override_result get_ssl_roots_override( } static VALUE grpc_rb_set_default_roots_pem(VALUE self, VALUE roots) { - char *roots_ptr = StringValueCStr(roots); + char* roots_ptr = StringValueCStr(roots); size_t length = strlen(roots_ptr); (void)self; pem_root_certs = gpr_malloc((length + 1) * sizeof(char)); @@ -255,8 +255,8 @@ void Init_grpc_channel_credentials() { } /* Gets the wrapped grpc_channel_credentials from the ruby wrapper */ -grpc_channel_credentials *grpc_rb_get_wrapped_channel_credentials(VALUE v) { - grpc_rb_channel_credentials *wrapper = NULL; +grpc_channel_credentials* grpc_rb_get_wrapped_channel_credentials(VALUE v) { + grpc_rb_channel_credentials* wrapper = NULL; TypedData_Get_Struct(v, grpc_rb_channel_credentials, &grpc_rb_channel_credentials_data_type, wrapper); return wrapper->wrapped; diff --git a/src/ruby/ext/grpc/rb_completion_queue.c b/src/ruby/ext/grpc/rb_completion_queue.c index 4283c27429..64264f5b15 100644 --- a/src/ruby/ext/grpc/rb_completion_queue.c +++ b/src/ruby/ext/grpc/rb_completion_queue.c @@ -30,16 +30,16 @@ /* Used to allow grpc_completion_queue_next call to release the GIL */ typedef struct next_call_stack { - grpc_completion_queue *cq; + grpc_completion_queue* cq; grpc_event event; gpr_timespec timeout; - void *tag; + void* tag; volatile int interrupted; } next_call_stack; /* Calls grpc_completion_queue_pluck without holding the ruby GIL */ -static void *grpc_rb_completion_queue_pluck_no_gil(void *param) { - next_call_stack *const next_call = (next_call_stack *)param; +static void* grpc_rb_completion_queue_pluck_no_gil(void* param) { + next_call_stack* const next_call = (next_call_stack*)param; gpr_timespec increment = gpr_time_from_millis(20, GPR_TIMESPAN); gpr_timespec deadline; do { @@ -55,7 +55,7 @@ static void *grpc_rb_completion_queue_pluck_no_gil(void *param) { } /* Helper function to free a completion queue. */ -void grpc_rb_completion_queue_destroy(grpc_completion_queue *cq) { +void grpc_rb_completion_queue_destroy(grpc_completion_queue* cq) { /* Every function that adds an event to a queue also synchronously plucks that event from the queue, and holds a reference to the Ruby object that holds the queue, so we only get to this point if all of those functions @@ -64,15 +64,15 @@ void grpc_rb_completion_queue_destroy(grpc_completion_queue *cq) { grpc_completion_queue_destroy(cq); } -static void unblock_func(void *param) { - next_call_stack *const next_call = (next_call_stack *)param; +static void unblock_func(void* param) { + next_call_stack* const next_call = (next_call_stack*)param; next_call->interrupted = 1; } /* Does the same thing as grpc_completion_queue_pluck, while properly releasing the GVL and handling interrupts */ -grpc_event rb_completion_queue_pluck(grpc_completion_queue *queue, void *tag, - gpr_timespec deadline, void *reserved) { +grpc_event rb_completion_queue_pluck(grpc_completion_queue* queue, void* tag, + gpr_timespec deadline, void* reserved) { next_call_stack next_call; MEMZERO(&next_call, next_call_stack, 1); next_call.cq = queue; @@ -91,8 +91,8 @@ grpc_event rb_completion_queue_pluck(grpc_completion_queue *queue, void *tag, do { next_call.interrupted = 0; rb_thread_call_without_gvl(grpc_rb_completion_queue_pluck_no_gil, - (void *)&next_call, unblock_func, - (void *)&next_call); + (void*)&next_call, unblock_func, + (void*)&next_call); /* If an interrupt prevented pluck from returning useful information, then any plucks that did complete must have timed out */ } while (next_call.interrupted && next_call.event.type == GRPC_QUEUE_TIMEOUT); diff --git a/src/ruby/ext/grpc/rb_completion_queue.h b/src/ruby/ext/grpc/rb_completion_queue.h index 011b849e3f..8c29089b9b 100644 --- a/src/ruby/ext/grpc/rb_completion_queue.h +++ b/src/ruby/ext/grpc/rb_completion_queue.h @@ -23,14 +23,14 @@ #include <grpc/grpc.h> -void grpc_rb_completion_queue_destroy(grpc_completion_queue *cq); +void grpc_rb_completion_queue_destroy(grpc_completion_queue* cq); /** * Makes the implementation of CompletionQueue#pluck available in other files * * This avoids having code that holds the GIL repeated at multiple sites. */ -grpc_event rb_completion_queue_pluck(grpc_completion_queue *queue, void *tag, - gpr_timespec deadline, void *reserved); +grpc_event rb_completion_queue_pluck(grpc_completion_queue* queue, void* tag, + gpr_timespec deadline, void* reserved); #endif /* GRPC_RB_COMPLETION_QUEUE_H_ */ diff --git a/src/ruby/ext/grpc/rb_compression_options.c b/src/ruby/ext/grpc/rb_compression_options.c index 3365b1784d..e24f20d2f9 100644 --- a/src/ruby/ext/grpc/rb_compression_options.c +++ b/src/ruby/ext/grpc/rb_compression_options.c @@ -47,17 +47,17 @@ static VALUE id_compress_level_high = Qnil; * Ruby objects and don't have a mark for GC. */ typedef struct grpc_rb_compression_options { /* The actual compression options that's being wrapped */ - grpc_compression_options *wrapped; + grpc_compression_options* wrapped; } grpc_rb_compression_options; /* Destroys the compression options instances and free the * wrapped grpc compression options. */ -static void grpc_rb_compression_options_free(void *p) { - grpc_rb_compression_options *wrapper = NULL; +static void grpc_rb_compression_options_free(void* p) { + grpc_rb_compression_options* wrapper = NULL; if (p == NULL) { return; }; - wrapper = (grpc_rb_compression_options *)p; + wrapper = (grpc_rb_compression_options*)p; if (wrapper->wrapped != NULL) { gpr_free(wrapper->wrapped); @@ -85,7 +85,7 @@ static rb_data_type_t grpc_rb_compression_options_data_type = { Allocate the wrapped grpc compression options and initialize it here too. */ static VALUE grpc_rb_compression_options_alloc(VALUE cls) { - grpc_rb_compression_options *wrapper = NULL; + grpc_rb_compression_options* wrapper = NULL; grpc_ruby_once_init(); @@ -103,7 +103,7 @@ static VALUE grpc_rb_compression_options_alloc(VALUE cls) { VALUE grpc_rb_compression_options_disable_compression_algorithm_internal( VALUE self, VALUE algorithm_to_disable) { grpc_compression_algorithm compression_algorithm = 0; - grpc_rb_compression_options *wrapper = NULL; + grpc_rb_compression_options* wrapper = NULL; TypedData_Get_Struct(self, grpc_rb_compression_options, &grpc_rb_compression_options_data_type, wrapper); @@ -145,7 +145,7 @@ grpc_compression_level grpc_rb_compression_options_level_name_to_value_internal( /* Sets the default compression level, given the name of a compression level. * Throws an error if no algorithm matched. */ void grpc_rb_compression_options_set_default_level( - grpc_compression_options *options, VALUE new_level_name) { + grpc_compression_options* options, VALUE new_level_name) { options->default_level.level = grpc_rb_compression_options_level_name_to_value_internal(new_level_name); options->default_level.is_set = 1; @@ -156,10 +156,10 @@ void grpc_rb_compression_options_set_default_level( * algorithm_value is an out parameter. * Raises an error if the name of the algorithm passed in is invalid. */ void grpc_rb_compression_options_algorithm_name_to_value_internal( - grpc_compression_algorithm *algorithm_value, VALUE algorithm_name) { + grpc_compression_algorithm* algorithm_value, VALUE algorithm_name) { grpc_slice name_slice; VALUE algorithm_name_as_string = Qnil; - char *tmp_str = NULL; + char* tmp_str = NULL; Check_Type(algorithm_name, T_SYMBOL); @@ -186,7 +186,7 @@ void grpc_rb_compression_options_algorithm_name_to_value_internal( * readable algorithm name. */ VALUE grpc_rb_compression_options_is_algorithm_enabled(VALUE self, VALUE algorithm_name) { - grpc_rb_compression_options *wrapper = NULL; + grpc_rb_compression_options* wrapper = NULL; grpc_compression_algorithm internal_algorithm_value; TypedData_Get_Struct(self, grpc_rb_compression_options, @@ -204,7 +204,7 @@ VALUE grpc_rb_compression_options_is_algorithm_enabled(VALUE self, /* Sets the default algorithm to the name of the algorithm passed in. * Raises an error if the name is not a valid compression algorithm name. */ void grpc_rb_compression_options_set_default_algorithm( - grpc_compression_options *options, VALUE algorithm_name) { + grpc_compression_options* options, VALUE algorithm_name) { grpc_rb_compression_options_algorithm_name_to_value_internal( &options->default_algorithm.algorithm, algorithm_name); options->default_algorithm.is_set = 1; @@ -214,7 +214,7 @@ void grpc_rb_compression_options_set_default_algorithm( * algorithm. * Fails if the algorithm name is invalid. */ void grpc_rb_compression_options_disable_algorithm( - grpc_compression_options *compression_options, VALUE algorithm_name) { + grpc_compression_options* compression_options, VALUE algorithm_name) { grpc_compression_algorithm internal_algorithm_value; grpc_rb_compression_options_algorithm_name_to_value_internal( @@ -226,8 +226,8 @@ void grpc_rb_compression_options_disable_algorithm( /* Provides a ruby hash of GRPC core channel argument key-values that * correspond to the compression settings on this instance. */ VALUE grpc_rb_compression_options_to_hash(VALUE self) { - grpc_rb_compression_options *wrapper = NULL; - grpc_compression_options *compression_options = NULL; + grpc_rb_compression_options* wrapper = NULL; + grpc_compression_options* compression_options = NULL; VALUE channel_arg_hash = rb_hash_new(); VALUE key = Qnil; VALUE value = Qnil; @@ -284,7 +284,7 @@ VALUE grpc_rb_compression_options_level_value_to_name_internal( * Fails if the enum value is invalid. */ VALUE grpc_rb_compression_options_algorithm_value_to_name_internal( grpc_compression_algorithm internal_value) { - char *algorithm_name = NULL; + char* algorithm_name = NULL; if (!grpc_compression_algorithm_name(internal_value, &algorithm_name)) { rb_raise(rb_eArgError, "Failed to convert algorithm value to name"); @@ -297,7 +297,7 @@ VALUE grpc_rb_compression_options_algorithm_value_to_name_internal( * Returns nil if no algorithm has been set. */ VALUE grpc_rb_compression_options_get_default_algorithm(VALUE self) { grpc_compression_algorithm internal_value; - grpc_rb_compression_options *wrapper = NULL; + grpc_rb_compression_options* wrapper = NULL; TypedData_Get_Struct(self, grpc_rb_compression_options, &grpc_rb_compression_options_data_type, wrapper); @@ -316,7 +316,7 @@ VALUE grpc_rb_compression_options_get_default_algorithm(VALUE self) { * A nil return value means that it hasn't been set. */ VALUE grpc_rb_compression_options_get_default_level(VALUE self) { grpc_compression_level internal_value; - grpc_rb_compression_options *wrapper = NULL; + grpc_rb_compression_options* wrapper = NULL; TypedData_Get_Struct(self, grpc_rb_compression_options, &grpc_rb_compression_options_data_type, wrapper); @@ -335,7 +335,7 @@ VALUE grpc_rb_compression_options_get_default_level(VALUE self) { VALUE grpc_rb_compression_options_get_disabled_algorithms(VALUE self) { VALUE disabled_algorithms = rb_ary_new(); grpc_compression_algorithm internal_value; - grpc_rb_compression_options *wrapper = NULL; + grpc_rb_compression_options* wrapper = NULL; TypedData_Get_Struct(self, grpc_rb_compression_options, &grpc_rb_compression_options_data_type, wrapper); @@ -363,8 +363,8 @@ VALUE grpc_rb_compression_options_get_disabled_algorithms(VALUE self) { * channel_arg hash = Hash.new[...] * channel_arg_hash_with_compression_options = channel_arg_hash.merge(options) */ -VALUE grpc_rb_compression_options_init(int argc, VALUE *argv, VALUE self) { - grpc_rb_compression_options *wrapper = NULL; +VALUE grpc_rb_compression_options_init(int argc, VALUE* argv, VALUE self) { + grpc_rb_compression_options* wrapper = NULL; VALUE default_algorithm = Qnil; VALUE default_level = Qnil; VALUE disabled_algorithms = Qnil; diff --git a/src/ruby/ext/grpc/rb_event_thread.c b/src/ruby/ext/grpc/rb_event_thread.c index b0bcb6f31e..281e41c9a8 100644 --- a/src/ruby/ext/grpc/rb_event_thread.c +++ b/src/ruby/ext/grpc/rb_event_thread.c @@ -31,15 +31,15 @@ typedef struct grpc_rb_event { // callback will be called with argument while holding the GVL - void (*callback)(void *); - void *argument; + void (*callback)(void*); + void* argument; - struct grpc_rb_event *next; + struct grpc_rb_event* next; } grpc_rb_event; typedef struct grpc_rb_event_queue { - grpc_rb_event *head; - grpc_rb_event *tail; + grpc_rb_event* head; + grpc_rb_event* tail; gpr_mu mu; gpr_cv cv; @@ -50,8 +50,8 @@ typedef struct grpc_rb_event_queue { static grpc_rb_event_queue event_queue; -void grpc_rb_event_queue_enqueue(void (*callback)(void *), void *argument) { - grpc_rb_event *event = gpr_malloc(sizeof(grpc_rb_event)); +void grpc_rb_event_queue_enqueue(void (*callback)(void*), void* argument) { + grpc_rb_event* event = gpr_malloc(sizeof(grpc_rb_event)); event->callback = callback; event->argument = argument; event->next = NULL; @@ -66,8 +66,8 @@ void grpc_rb_event_queue_enqueue(void (*callback)(void *), void *argument) { gpr_mu_unlock(&event_queue.mu); } -static grpc_rb_event *grpc_rb_event_queue_dequeue() { - grpc_rb_event *event; +static grpc_rb_event* grpc_rb_event_queue_dequeue() { + grpc_rb_event* event; if (event_queue.head == NULL) { event = NULL; } else { @@ -86,8 +86,8 @@ static void grpc_rb_event_queue_destroy() { gpr_cv_destroy(&event_queue.cv); } -static void *grpc_rb_wait_for_event_no_gil(void *param) { - grpc_rb_event *event = NULL; +static void* grpc_rb_wait_for_event_no_gil(void* param) { + grpc_rb_event* event = NULL; (void)param; gpr_mu_lock(&event_queue.mu); while (!event_queue.abort) { @@ -102,7 +102,7 @@ static void *grpc_rb_wait_for_event_no_gil(void *param) { return NULL; } -static void grpc_rb_event_unblocking_func(void *arg) { +static void grpc_rb_event_unblocking_func(void* arg) { (void)arg; gpr_mu_lock(&event_queue.mu); event_queue.abort = true; @@ -113,10 +113,10 @@ static void grpc_rb_event_unblocking_func(void *arg) { /* This is the implementation of the thread that handles auth metadata plugin * events */ static VALUE grpc_rb_event_thread(VALUE arg) { - grpc_rb_event *event; + grpc_rb_event* event; (void)arg; while (true) { - event = (grpc_rb_event *)rb_thread_call_without_gvl( + event = (grpc_rb_event*)rb_thread_call_without_gvl( grpc_rb_wait_for_event_no_gil, NULL, grpc_rb_event_unblocking_func, NULL); if (event == NULL) { diff --git a/src/ruby/ext/grpc/rb_event_thread.h b/src/ruby/ext/grpc/rb_event_thread.h index 5bfecb9a68..fa9c14e169 100644 --- a/src/ruby/ext/grpc/rb_event_thread.h +++ b/src/ruby/ext/grpc/rb_event_thread.h @@ -18,4 +18,4 @@ void grpc_rb_event_queue_thread_start(); -void grpc_rb_event_queue_enqueue(void (*callback)(void *), void *argument); +void grpc_rb_event_queue_enqueue(void (*callback)(void*), void* argument); diff --git a/src/ruby/ext/grpc/rb_grpc.c b/src/ruby/ext/grpc/rb_grpc.c index b53f09edec..f065a857db 100644 --- a/src/ruby/ext/grpc/rb_grpc.c +++ b/src/ruby/ext/grpc/rb_grpc.c @@ -90,9 +90,9 @@ static ID id_tv_nsec; */ gpr_timespec grpc_rb_time_timeval(VALUE time, int interval) { gpr_timespec t; - gpr_timespec *time_const; - const char *tstr = interval ? "time interval" : "time"; - const char *want = " want <secs from epoch>|<Time>|<GRPC::TimeConst.*>"; + gpr_timespec* time_const; + const char* tstr = interval ? "time interval" : "time"; + const char* want = " want <secs from epoch>|<Time>|<GRPC::TimeConst.*>"; t.clock_type = GPR_CLOCK_REALTIME; switch (TYPE(time)) { @@ -201,7 +201,7 @@ static ID id_to_s; /* Converts a wrapped time constant to a standard time. */ static VALUE grpc_rb_time_val_to_time(VALUE self) { - gpr_timespec *time_const = NULL; + gpr_timespec* time_const = NULL; gpr_timespec real_time; TypedData_Get_Struct(self, gpr_timespec, &grpc_rb_timespec_data_type, time_const); @@ -236,15 +236,15 @@ static void Init_grpc_time_consts() { rb_define_const( grpc_rb_mTimeConsts, "ZERO", TypedData_Wrap_Struct(grpc_rb_cTimeVal, &grpc_rb_timespec_data_type, - (void *)&zero_realtime)); + (void*)&zero_realtime)); rb_define_const( grpc_rb_mTimeConsts, "INFINITE_FUTURE", TypedData_Wrap_Struct(grpc_rb_cTimeVal, &grpc_rb_timespec_data_type, - (void *)&inf_future_realtime)); + (void*)&inf_future_realtime)); rb_define_const( grpc_rb_mTimeConsts, "INFINITE_PAST", TypedData_Wrap_Struct(grpc_rb_cTimeVal, &grpc_rb_timespec_data_type, - (void *)&inf_past_realtime)); + (void*)&inf_past_realtime)); rb_define_method(grpc_rb_cTimeVal, "to_time", grpc_rb_time_val_to_time, 0); rb_define_method(grpc_rb_cTimeVal, "inspect", grpc_rb_time_val_inspect, 0); rb_define_method(grpc_rb_cTimeVal, "to_s", grpc_rb_time_val_to_s, 0); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index 128e912e23..648d515003 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -172,7 +172,6 @@ grpc_slice_default_eq_impl_type grpc_slice_default_eq_impl_import; grpc_slice_eq_type grpc_slice_eq_import; grpc_slice_cmp_type grpc_slice_cmp_import; grpc_slice_str_cmp_type grpc_slice_str_cmp_import; -grpc_slice_buf_cmp_type grpc_slice_buf_cmp_import; grpc_slice_buf_start_eq_type grpc_slice_buf_start_eq_import; grpc_slice_rchr_type grpc_slice_rchr_import; grpc_slice_chr_type grpc_slice_chr_import; @@ -460,7 +459,6 @@ void grpc_rb_load_imports(HMODULE library) { grpc_slice_eq_import = (grpc_slice_eq_type) GetProcAddress(library, "grpc_slice_eq"); grpc_slice_cmp_import = (grpc_slice_cmp_type) GetProcAddress(library, "grpc_slice_cmp"); grpc_slice_str_cmp_import = (grpc_slice_str_cmp_type) GetProcAddress(library, "grpc_slice_str_cmp"); - grpc_slice_buf_cmp_import = (grpc_slice_buf_cmp_type) GetProcAddress(library, "grpc_slice_buf_cmp"); grpc_slice_buf_start_eq_import = (grpc_slice_buf_start_eq_type) GetProcAddress(library, "grpc_slice_buf_start_eq"); grpc_slice_rchr_import = (grpc_slice_rchr_type) GetProcAddress(library, "grpc_slice_rchr"); grpc_slice_chr_import = (grpc_slice_chr_type) GetProcAddress(library, "grpc_slice_chr"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index b9b82e5e23..ae1e1a0b30 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -46,13 +46,13 @@ #include <grpc/support/thd.h> #include <grpc/support/time.h> -typedef int(*grpc_compression_algorithm_parse_type)(grpc_slice value, grpc_compression_algorithm *algorithm); +typedef int(*grpc_compression_algorithm_parse_type)(grpc_slice value, grpc_compression_algorithm* algorithm); extern grpc_compression_algorithm_parse_type grpc_compression_algorithm_parse_import; #define grpc_compression_algorithm_parse grpc_compression_algorithm_parse_import -typedef int(*grpc_compression_algorithm_name_type)(grpc_compression_algorithm algorithm, const char **name); +typedef int(*grpc_compression_algorithm_name_type)(grpc_compression_algorithm algorithm, const char** name); extern grpc_compression_algorithm_name_type grpc_compression_algorithm_name_import; #define grpc_compression_algorithm_name grpc_compression_algorithm_name_import -typedef int(*grpc_stream_compression_algorithm_name_type)(grpc_stream_compression_algorithm algorithm, const char **name); +typedef int(*grpc_stream_compression_algorithm_name_type)(grpc_stream_compression_algorithm algorithm, const char** name); extern grpc_stream_compression_algorithm_name_type grpc_stream_compression_algorithm_name_import; #define grpc_stream_compression_algorithm_name grpc_stream_compression_algorithm_name_import typedef grpc_compression_algorithm(*grpc_compression_algorithm_for_level_type)(grpc_compression_level level, uint32_t accepted_encodings); @@ -61,31 +61,31 @@ extern grpc_compression_algorithm_for_level_type grpc_compression_algorithm_for_ typedef grpc_stream_compression_algorithm(*grpc_stream_compression_algorithm_for_level_type)(grpc_stream_compression_level level, uint32_t accepted_stream_encodings); extern grpc_stream_compression_algorithm_for_level_type grpc_stream_compression_algorithm_for_level_import; #define grpc_stream_compression_algorithm_for_level grpc_stream_compression_algorithm_for_level_import -typedef void(*grpc_compression_options_init_type)(grpc_compression_options *opts); +typedef void(*grpc_compression_options_init_type)(grpc_compression_options* opts); extern grpc_compression_options_init_type grpc_compression_options_init_import; #define grpc_compression_options_init grpc_compression_options_init_import -typedef void(*grpc_compression_options_enable_algorithm_type)(grpc_compression_options *opts, grpc_compression_algorithm algorithm); +typedef void(*grpc_compression_options_enable_algorithm_type)(grpc_compression_options* opts, grpc_compression_algorithm algorithm); extern grpc_compression_options_enable_algorithm_type grpc_compression_options_enable_algorithm_import; #define grpc_compression_options_enable_algorithm grpc_compression_options_enable_algorithm_import -typedef void(*grpc_compression_options_disable_algorithm_type)(grpc_compression_options *opts, grpc_compression_algorithm algorithm); +typedef void(*grpc_compression_options_disable_algorithm_type)(grpc_compression_options* opts, grpc_compression_algorithm algorithm); extern grpc_compression_options_disable_algorithm_type grpc_compression_options_disable_algorithm_import; #define grpc_compression_options_disable_algorithm grpc_compression_options_disable_algorithm_import -typedef int(*grpc_compression_options_is_algorithm_enabled_type)(const grpc_compression_options *opts, grpc_compression_algorithm algorithm); +typedef int(*grpc_compression_options_is_algorithm_enabled_type)(const grpc_compression_options* opts, grpc_compression_algorithm algorithm); extern grpc_compression_options_is_algorithm_enabled_type grpc_compression_options_is_algorithm_enabled_import; #define grpc_compression_options_is_algorithm_enabled grpc_compression_options_is_algorithm_enabled_import -typedef int(*grpc_compression_options_is_stream_compression_algorithm_enabled_type)(const grpc_compression_options *opts, grpc_stream_compression_algorithm algorithm); +typedef int(*grpc_compression_options_is_stream_compression_algorithm_enabled_type)(const grpc_compression_options* opts, grpc_stream_compression_algorithm algorithm); extern grpc_compression_options_is_stream_compression_algorithm_enabled_type grpc_compression_options_is_stream_compression_algorithm_enabled_import; #define grpc_compression_options_is_stream_compression_algorithm_enabled grpc_compression_options_is_stream_compression_algorithm_enabled_import -typedef void(*grpc_metadata_array_init_type)(grpc_metadata_array *array); +typedef void(*grpc_metadata_array_init_type)(grpc_metadata_array* array); extern grpc_metadata_array_init_type grpc_metadata_array_init_import; #define grpc_metadata_array_init grpc_metadata_array_init_import -typedef void(*grpc_metadata_array_destroy_type)(grpc_metadata_array *array); +typedef void(*grpc_metadata_array_destroy_type)(grpc_metadata_array* array); extern grpc_metadata_array_destroy_type grpc_metadata_array_destroy_import; #define grpc_metadata_array_destroy grpc_metadata_array_destroy_import -typedef void(*grpc_call_details_init_type)(grpc_call_details *details); +typedef void(*grpc_call_details_init_type)(grpc_call_details* details); extern grpc_call_details_init_type grpc_call_details_init_import; #define grpc_call_details_init grpc_call_details_init_import -typedef void(*grpc_call_details_destroy_type)(grpc_call_details *details); +typedef void(*grpc_call_details_destroy_type)(grpc_call_details* details); extern grpc_call_details_destroy_type grpc_call_details_destroy_import; #define grpc_call_details_destroy grpc_call_details_destroy_import typedef void(*grpc_register_plugin_type)(void (*init)(void), void (*destroy)(void)); @@ -97,151 +97,151 @@ extern grpc_init_type grpc_init_import; typedef void(*grpc_shutdown_type)(void); extern grpc_shutdown_type grpc_shutdown_import; #define grpc_shutdown grpc_shutdown_import -typedef const char *(*grpc_version_string_type)(void); +typedef const char*(*grpc_version_string_type)(void); extern grpc_version_string_type grpc_version_string_import; #define grpc_version_string grpc_version_string_import -typedef const char *(*grpc_g_stands_for_type)(void); +typedef const char*(*grpc_g_stands_for_type)(void); extern grpc_g_stands_for_type grpc_g_stands_for_import; #define grpc_g_stands_for grpc_g_stands_for_import -typedef const grpc_completion_queue_factory *(*grpc_completion_queue_factory_lookup_type)(const grpc_completion_queue_attributes *attributes); +typedef const grpc_completion_queue_factory*(*grpc_completion_queue_factory_lookup_type)(const grpc_completion_queue_attributes* attributes); extern grpc_completion_queue_factory_lookup_type grpc_completion_queue_factory_lookup_import; #define grpc_completion_queue_factory_lookup grpc_completion_queue_factory_lookup_import -typedef grpc_completion_queue *(*grpc_completion_queue_create_for_next_type)(void *reserved); +typedef grpc_completion_queue*(*grpc_completion_queue_create_for_next_type)(void* reserved); extern grpc_completion_queue_create_for_next_type grpc_completion_queue_create_for_next_import; #define grpc_completion_queue_create_for_next grpc_completion_queue_create_for_next_import -typedef grpc_completion_queue *(*grpc_completion_queue_create_for_pluck_type)(void *reserved); +typedef grpc_completion_queue*(*grpc_completion_queue_create_for_pluck_type)(void* reserved); extern grpc_completion_queue_create_for_pluck_type grpc_completion_queue_create_for_pluck_import; #define grpc_completion_queue_create_for_pluck grpc_completion_queue_create_for_pluck_import -typedef grpc_completion_queue *(*grpc_completion_queue_create_type)(const grpc_completion_queue_factory *factory, const grpc_completion_queue_attributes *attributes, void *reserved); +typedef grpc_completion_queue*(*grpc_completion_queue_create_type)(const grpc_completion_queue_factory* factory, const grpc_completion_queue_attributes* attributes, void* reserved); extern grpc_completion_queue_create_type grpc_completion_queue_create_import; #define grpc_completion_queue_create grpc_completion_queue_create_import -typedef grpc_event(*grpc_completion_queue_next_type)(grpc_completion_queue *cq, gpr_timespec deadline, void *reserved); +typedef grpc_event(*grpc_completion_queue_next_type)(grpc_completion_queue* cq, gpr_timespec deadline, void* reserved); extern grpc_completion_queue_next_type grpc_completion_queue_next_import; #define grpc_completion_queue_next grpc_completion_queue_next_import -typedef grpc_event(*grpc_completion_queue_pluck_type)(grpc_completion_queue *cq, void *tag, gpr_timespec deadline, void *reserved); +typedef grpc_event(*grpc_completion_queue_pluck_type)(grpc_completion_queue* cq, void* tag, gpr_timespec deadline, void* reserved); extern grpc_completion_queue_pluck_type grpc_completion_queue_pluck_import; #define grpc_completion_queue_pluck grpc_completion_queue_pluck_import -typedef void(*grpc_completion_queue_shutdown_type)(grpc_completion_queue *cq); +typedef void(*grpc_completion_queue_shutdown_type)(grpc_completion_queue* cq); extern grpc_completion_queue_shutdown_type grpc_completion_queue_shutdown_import; #define grpc_completion_queue_shutdown grpc_completion_queue_shutdown_import -typedef void(*grpc_completion_queue_destroy_type)(grpc_completion_queue *cq); +typedef void(*grpc_completion_queue_destroy_type)(grpc_completion_queue* cq); extern grpc_completion_queue_destroy_type grpc_completion_queue_destroy_import; #define grpc_completion_queue_destroy grpc_completion_queue_destroy_import -typedef void(*grpc_completion_queue_thread_local_cache_init_type)(grpc_completion_queue *cq); +typedef void(*grpc_completion_queue_thread_local_cache_init_type)(grpc_completion_queue* cq); extern grpc_completion_queue_thread_local_cache_init_type grpc_completion_queue_thread_local_cache_init_import; #define grpc_completion_queue_thread_local_cache_init grpc_completion_queue_thread_local_cache_init_import -typedef int(*grpc_completion_queue_thread_local_cache_flush_type)(grpc_completion_queue *cq, void **tag, int *ok); +typedef int(*grpc_completion_queue_thread_local_cache_flush_type)(grpc_completion_queue* cq, void** tag, int* ok); extern grpc_completion_queue_thread_local_cache_flush_type grpc_completion_queue_thread_local_cache_flush_import; #define grpc_completion_queue_thread_local_cache_flush grpc_completion_queue_thread_local_cache_flush_import -typedef grpc_alarm *(*grpc_alarm_create_type)(void *reserved); +typedef grpc_alarm*(*grpc_alarm_create_type)(void* reserved); extern grpc_alarm_create_type grpc_alarm_create_import; #define grpc_alarm_create grpc_alarm_create_import -typedef void(*grpc_alarm_set_type)(grpc_alarm *alarm, grpc_completion_queue *cq, gpr_timespec deadline, void *tag, void *reserved); +typedef void(*grpc_alarm_set_type)(grpc_alarm* alarm, grpc_completion_queue* cq, gpr_timespec deadline, void* tag, void* reserved); extern grpc_alarm_set_type grpc_alarm_set_import; #define grpc_alarm_set grpc_alarm_set_import -typedef void(*grpc_alarm_cancel_type)(grpc_alarm *alarm, void *reserved); +typedef void(*grpc_alarm_cancel_type)(grpc_alarm* alarm, void* reserved); extern grpc_alarm_cancel_type grpc_alarm_cancel_import; #define grpc_alarm_cancel grpc_alarm_cancel_import -typedef void(*grpc_alarm_destroy_type)(grpc_alarm *alarm, void *reserved); +typedef void(*grpc_alarm_destroy_type)(grpc_alarm* alarm, void* reserved); extern grpc_alarm_destroy_type grpc_alarm_destroy_import; #define grpc_alarm_destroy grpc_alarm_destroy_import -typedef grpc_connectivity_state(*grpc_channel_check_connectivity_state_type)(grpc_channel *channel, int try_to_connect); +typedef grpc_connectivity_state(*grpc_channel_check_connectivity_state_type)(grpc_channel* channel, int try_to_connect); extern grpc_channel_check_connectivity_state_type grpc_channel_check_connectivity_state_import; #define grpc_channel_check_connectivity_state grpc_channel_check_connectivity_state_import -typedef int(*grpc_channel_num_external_connectivity_watchers_type)(grpc_channel *channel); +typedef int(*grpc_channel_num_external_connectivity_watchers_type)(grpc_channel* channel); extern grpc_channel_num_external_connectivity_watchers_type grpc_channel_num_external_connectivity_watchers_import; #define grpc_channel_num_external_connectivity_watchers grpc_channel_num_external_connectivity_watchers_import -typedef void(*grpc_channel_watch_connectivity_state_type)(grpc_channel *channel, grpc_connectivity_state last_observed_state, gpr_timespec deadline, grpc_completion_queue *cq, void *tag); +typedef void(*grpc_channel_watch_connectivity_state_type)(grpc_channel* channel, grpc_connectivity_state last_observed_state, gpr_timespec deadline, grpc_completion_queue* cq, void* tag); extern grpc_channel_watch_connectivity_state_type grpc_channel_watch_connectivity_state_import; #define grpc_channel_watch_connectivity_state grpc_channel_watch_connectivity_state_import -typedef int(*grpc_channel_support_connectivity_watcher_type)(grpc_channel *channel); +typedef int(*grpc_channel_support_connectivity_watcher_type)(grpc_channel* channel); extern grpc_channel_support_connectivity_watcher_type grpc_channel_support_connectivity_watcher_import; #define grpc_channel_support_connectivity_watcher grpc_channel_support_connectivity_watcher_import -typedef grpc_call *(*grpc_channel_create_call_type)(grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, grpc_completion_queue *completion_queue, grpc_slice method, const grpc_slice *host, gpr_timespec deadline, void *reserved); +typedef grpc_call*(*grpc_channel_create_call_type)(grpc_channel* channel, grpc_call* parent_call, uint32_t propagation_mask, grpc_completion_queue* completion_queue, grpc_slice method, const grpc_slice* host, gpr_timespec deadline, void* reserved); extern grpc_channel_create_call_type grpc_channel_create_call_import; #define grpc_channel_create_call grpc_channel_create_call_import -typedef void(*grpc_channel_ping_type)(grpc_channel *channel, grpc_completion_queue *cq, void *tag, void *reserved); +typedef void(*grpc_channel_ping_type)(grpc_channel* channel, grpc_completion_queue* cq, void* tag, void* reserved); extern grpc_channel_ping_type grpc_channel_ping_import; #define grpc_channel_ping grpc_channel_ping_import -typedef void *(*grpc_channel_register_call_type)(grpc_channel *channel, const char *method, const char *host, void *reserved); +typedef void*(*grpc_channel_register_call_type)(grpc_channel* channel, const char* method, const char* host, void* reserved); extern grpc_channel_register_call_type grpc_channel_register_call_import; #define grpc_channel_register_call grpc_channel_register_call_import -typedef grpc_call *(*grpc_channel_create_registered_call_type)(grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, grpc_completion_queue *completion_queue, void *registered_call_handle, gpr_timespec deadline, void *reserved); +typedef grpc_call*(*grpc_channel_create_registered_call_type)(grpc_channel* channel, grpc_call* parent_call, uint32_t propagation_mask, grpc_completion_queue* completion_queue, void* registered_call_handle, gpr_timespec deadline, void* reserved); extern grpc_channel_create_registered_call_type grpc_channel_create_registered_call_import; #define grpc_channel_create_registered_call grpc_channel_create_registered_call_import -typedef void *(*grpc_call_arena_alloc_type)(grpc_call *call, size_t size); +typedef void*(*grpc_call_arena_alloc_type)(grpc_call* call, size_t size); extern grpc_call_arena_alloc_type grpc_call_arena_alloc_import; #define grpc_call_arena_alloc grpc_call_arena_alloc_import -typedef grpc_call_error(*grpc_call_start_batch_type)(grpc_call *call, const grpc_op *ops, size_t nops, void *tag, void *reserved); +typedef grpc_call_error(*grpc_call_start_batch_type)(grpc_call* call, const grpc_op* ops, size_t nops, void* tag, void* reserved); extern grpc_call_start_batch_type grpc_call_start_batch_import; #define grpc_call_start_batch grpc_call_start_batch_import -typedef char *(*grpc_call_get_peer_type)(grpc_call *call); +typedef char*(*grpc_call_get_peer_type)(grpc_call* call); extern grpc_call_get_peer_type grpc_call_get_peer_import; #define grpc_call_get_peer grpc_call_get_peer_import -typedef void(*grpc_census_call_set_context_type)(grpc_call *call, struct census_context *context); +typedef void(*grpc_census_call_set_context_type)(grpc_call* call, struct census_context* context); extern grpc_census_call_set_context_type grpc_census_call_set_context_import; #define grpc_census_call_set_context grpc_census_call_set_context_import -typedef struct census_context *(*grpc_census_call_get_context_type)(grpc_call *call); +typedef struct census_context*(*grpc_census_call_get_context_type)(grpc_call* call); extern grpc_census_call_get_context_type grpc_census_call_get_context_import; #define grpc_census_call_get_context grpc_census_call_get_context_import -typedef char *(*grpc_channel_get_target_type)(grpc_channel *channel); +typedef char*(*grpc_channel_get_target_type)(grpc_channel* channel); extern grpc_channel_get_target_type grpc_channel_get_target_import; #define grpc_channel_get_target grpc_channel_get_target_import -typedef void(*grpc_channel_get_info_type)(grpc_channel *channel, const grpc_channel_info *channel_info); +typedef void(*grpc_channel_get_info_type)(grpc_channel* channel, const grpc_channel_info* channel_info); extern grpc_channel_get_info_type grpc_channel_get_info_import; #define grpc_channel_get_info grpc_channel_get_info_import -typedef grpc_channel *(*grpc_insecure_channel_create_type)(const char *target, const grpc_channel_args *args, void *reserved); +typedef grpc_channel*(*grpc_insecure_channel_create_type)(const char* target, const grpc_channel_args* args, void* reserved); extern grpc_insecure_channel_create_type grpc_insecure_channel_create_import; #define grpc_insecure_channel_create grpc_insecure_channel_create_import -typedef grpc_channel *(*grpc_lame_client_channel_create_type)(const char *target, grpc_status_code error_code, const char *error_message); +typedef grpc_channel*(*grpc_lame_client_channel_create_type)(const char* target, grpc_status_code error_code, const char* error_message); extern grpc_lame_client_channel_create_type grpc_lame_client_channel_create_import; #define grpc_lame_client_channel_create grpc_lame_client_channel_create_import -typedef void(*grpc_channel_destroy_type)(grpc_channel *channel); +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 grpc_call_error(*grpc_call_cancel_type)(grpc_call *call, void *reserved); +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 -typedef grpc_call_error(*grpc_call_cancel_with_status_type)(grpc_call *call, grpc_status_code status, const char *description, void *reserved); +typedef grpc_call_error(*grpc_call_cancel_with_status_type)(grpc_call* call, grpc_status_code status, const char* description, void* reserved); extern grpc_call_cancel_with_status_type grpc_call_cancel_with_status_import; #define grpc_call_cancel_with_status grpc_call_cancel_with_status_import -typedef void(*grpc_call_ref_type)(grpc_call *call); +typedef void(*grpc_call_ref_type)(grpc_call* call); extern grpc_call_ref_type grpc_call_ref_import; #define grpc_call_ref grpc_call_ref_import -typedef void(*grpc_call_unref_type)(grpc_call *call); +typedef void(*grpc_call_unref_type)(grpc_call* call); extern grpc_call_unref_type grpc_call_unref_import; #define grpc_call_unref grpc_call_unref_import -typedef grpc_call_error(*grpc_server_request_call_type)(grpc_server *server, grpc_call **call, grpc_call_details *details, grpc_metadata_array *request_metadata, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void *tag_new); +typedef grpc_call_error(*grpc_server_request_call_type)(grpc_server* server, grpc_call** call, grpc_call_details* details, grpc_metadata_array* request_metadata, grpc_completion_queue* cq_bound_to_call, grpc_completion_queue* cq_for_notification, void* tag_new); extern grpc_server_request_call_type grpc_server_request_call_import; #define grpc_server_request_call grpc_server_request_call_import -typedef void *(*grpc_server_register_method_type)(grpc_server *server, const char *method, const char *host, grpc_server_register_method_payload_handling payload_handling, uint32_t flags); +typedef void*(*grpc_server_register_method_type)(grpc_server* server, const char* method, const char* host, grpc_server_register_method_payload_handling payload_handling, uint32_t flags); extern grpc_server_register_method_type grpc_server_register_method_import; #define grpc_server_register_method grpc_server_register_method_import -typedef grpc_call_error(*grpc_server_request_registered_call_type)(grpc_server *server, void *registered_method, grpc_call **call, gpr_timespec *deadline, grpc_metadata_array *request_metadata, grpc_byte_buffer **optional_payload, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void *tag_new); +typedef grpc_call_error(*grpc_server_request_registered_call_type)(grpc_server* server, void* registered_method, grpc_call** call, gpr_timespec* deadline, grpc_metadata_array* request_metadata, grpc_byte_buffer** optional_payload, grpc_completion_queue* cq_bound_to_call, grpc_completion_queue* cq_for_notification, void* tag_new); extern grpc_server_request_registered_call_type grpc_server_request_registered_call_import; #define grpc_server_request_registered_call grpc_server_request_registered_call_import -typedef grpc_server *(*grpc_server_create_type)(const grpc_channel_args *args, void *reserved); +typedef grpc_server*(*grpc_server_create_type)(const grpc_channel_args* args, void* reserved); extern grpc_server_create_type grpc_server_create_import; #define grpc_server_create grpc_server_create_import -typedef void(*grpc_server_register_completion_queue_type)(grpc_server *server, grpc_completion_queue *cq, void *reserved); +typedef void(*grpc_server_register_completion_queue_type)(grpc_server* server, grpc_completion_queue* cq, void* reserved); extern grpc_server_register_completion_queue_type grpc_server_register_completion_queue_import; #define grpc_server_register_completion_queue grpc_server_register_completion_queue_import -typedef int(*grpc_server_add_insecure_http2_port_type)(grpc_server *server, const char *addr); +typedef int(*grpc_server_add_insecure_http2_port_type)(grpc_server* server, const char* addr); extern grpc_server_add_insecure_http2_port_type grpc_server_add_insecure_http2_port_import; #define grpc_server_add_insecure_http2_port grpc_server_add_insecure_http2_port_import -typedef void(*grpc_server_start_type)(grpc_server *server); +typedef void(*grpc_server_start_type)(grpc_server* server); extern grpc_server_start_type grpc_server_start_import; #define grpc_server_start grpc_server_start_import -typedef void(*grpc_server_shutdown_and_notify_type)(grpc_server *server, grpc_completion_queue *cq, void *tag); +typedef void(*grpc_server_shutdown_and_notify_type)(grpc_server* server, grpc_completion_queue* cq, void* tag); extern grpc_server_shutdown_and_notify_type grpc_server_shutdown_and_notify_import; #define grpc_server_shutdown_and_notify grpc_server_shutdown_and_notify_import -typedef void(*grpc_server_cancel_all_calls_type)(grpc_server *server); +typedef void(*grpc_server_cancel_all_calls_type)(grpc_server* server); extern grpc_server_cancel_all_calls_type grpc_server_cancel_all_calls_import; #define grpc_server_cancel_all_calls grpc_server_cancel_all_calls_import -typedef void(*grpc_server_destroy_type)(grpc_server *server); +typedef void(*grpc_server_destroy_type)(grpc_server* server); extern grpc_server_destroy_type grpc_server_destroy_import; #define grpc_server_destroy grpc_server_destroy_import -typedef int(*grpc_tracer_set_enabled_type)(const char *name, int enabled); +typedef int(*grpc_tracer_set_enabled_type)(const char* name, int enabled); extern grpc_tracer_set_enabled_type grpc_tracer_set_enabled_import; #define grpc_tracer_set_enabled grpc_tracer_set_enabled_import typedef int(*grpc_header_key_is_legal_type)(grpc_slice slice); @@ -253,175 +253,175 @@ extern grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_ typedef int(*grpc_is_binary_header_type)(grpc_slice slice); extern grpc_is_binary_header_type grpc_is_binary_header_import; #define grpc_is_binary_header grpc_is_binary_header_import -typedef const char *(*grpc_call_error_to_string_type)(grpc_call_error error); +typedef const char*(*grpc_call_error_to_string_type)(grpc_call_error error); extern grpc_call_error_to_string_type grpc_call_error_to_string_import; #define grpc_call_error_to_string grpc_call_error_to_string_import -typedef grpc_resource_quota *(*grpc_resource_quota_create_type)(const char *trace_name); +typedef grpc_resource_quota*(*grpc_resource_quota_create_type)(const char* trace_name); extern grpc_resource_quota_create_type grpc_resource_quota_create_import; #define grpc_resource_quota_create grpc_resource_quota_create_import -typedef void(*grpc_resource_quota_ref_type)(grpc_resource_quota *resource_quota); +typedef void(*grpc_resource_quota_ref_type)(grpc_resource_quota* resource_quota); extern grpc_resource_quota_ref_type grpc_resource_quota_ref_import; #define grpc_resource_quota_ref grpc_resource_quota_ref_import -typedef void(*grpc_resource_quota_unref_type)(grpc_resource_quota *resource_quota); +typedef void(*grpc_resource_quota_unref_type)(grpc_resource_quota* resource_quota); extern grpc_resource_quota_unref_type grpc_resource_quota_unref_import; #define grpc_resource_quota_unref grpc_resource_quota_unref_import -typedef void(*grpc_resource_quota_resize_type)(grpc_resource_quota *resource_quota, size_t new_size); +typedef void(*grpc_resource_quota_resize_type)(grpc_resource_quota* resource_quota, size_t new_size); extern grpc_resource_quota_resize_type grpc_resource_quota_resize_import; #define grpc_resource_quota_resize grpc_resource_quota_resize_import -typedef const grpc_arg_pointer_vtable *(*grpc_resource_quota_arg_vtable_type)(void); +typedef const grpc_arg_pointer_vtable*(*grpc_resource_quota_arg_vtable_type)(void); extern grpc_resource_quota_arg_vtable_type grpc_resource_quota_arg_vtable_import; #define grpc_resource_quota_arg_vtable grpc_resource_quota_arg_vtable_import -typedef grpc_channel *(*grpc_insecure_channel_create_from_fd_type)(const char *target, int fd, const grpc_channel_args *args); +typedef grpc_channel*(*grpc_insecure_channel_create_from_fd_type)(const char* target, int fd, const grpc_channel_args* args); extern grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; #define grpc_insecure_channel_create_from_fd grpc_insecure_channel_create_from_fd_import -typedef void(*grpc_server_add_insecure_channel_from_fd_type)(grpc_server *server, void *reserved, int fd); +typedef void(*grpc_server_add_insecure_channel_from_fd_type)(grpc_server* server, void* reserved, int fd); extern grpc_server_add_insecure_channel_from_fd_type grpc_server_add_insecure_channel_from_fd_import; #define grpc_server_add_insecure_channel_from_fd grpc_server_add_insecure_channel_from_fd_import typedef void(*grpc_use_signal_type)(int signum); extern grpc_use_signal_type grpc_use_signal_import; #define grpc_use_signal grpc_use_signal_import -typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); +typedef const grpc_auth_property*(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator* it); extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import -typedef grpc_auth_property_iterator(*grpc_auth_context_property_iterator_type)(const grpc_auth_context *ctx); +typedef grpc_auth_property_iterator(*grpc_auth_context_property_iterator_type)(const grpc_auth_context* ctx); extern grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; #define grpc_auth_context_property_iterator grpc_auth_context_property_iterator_import -typedef grpc_auth_property_iterator(*grpc_auth_context_peer_identity_type)(const grpc_auth_context *ctx); +typedef grpc_auth_property_iterator(*grpc_auth_context_peer_identity_type)(const grpc_auth_context* ctx); extern grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; #define grpc_auth_context_peer_identity grpc_auth_context_peer_identity_import -typedef grpc_auth_property_iterator(*grpc_auth_context_find_properties_by_name_type)(const grpc_auth_context *ctx, const char *name); +typedef grpc_auth_property_iterator(*grpc_auth_context_find_properties_by_name_type)(const grpc_auth_context* ctx, const char* name); extern grpc_auth_context_find_properties_by_name_type grpc_auth_context_find_properties_by_name_import; #define grpc_auth_context_find_properties_by_name grpc_auth_context_find_properties_by_name_import -typedef const char *(*grpc_auth_context_peer_identity_property_name_type)(const grpc_auth_context *ctx); +typedef const char*(*grpc_auth_context_peer_identity_property_name_type)(const grpc_auth_context* ctx); extern grpc_auth_context_peer_identity_property_name_type grpc_auth_context_peer_identity_property_name_import; #define grpc_auth_context_peer_identity_property_name grpc_auth_context_peer_identity_property_name_import -typedef int(*grpc_auth_context_peer_is_authenticated_type)(const grpc_auth_context *ctx); +typedef int(*grpc_auth_context_peer_is_authenticated_type)(const grpc_auth_context* ctx); extern grpc_auth_context_peer_is_authenticated_type grpc_auth_context_peer_is_authenticated_import; #define grpc_auth_context_peer_is_authenticated grpc_auth_context_peer_is_authenticated_import -typedef grpc_auth_context *(*grpc_call_auth_context_type)(grpc_call *call); +typedef grpc_auth_context*(*grpc_call_auth_context_type)(grpc_call* call); extern grpc_call_auth_context_type grpc_call_auth_context_import; #define grpc_call_auth_context grpc_call_auth_context_import -typedef void(*grpc_auth_context_release_type)(grpc_auth_context *context); +typedef void(*grpc_auth_context_release_type)(grpc_auth_context* context); extern grpc_auth_context_release_type grpc_auth_context_release_import; #define grpc_auth_context_release grpc_auth_context_release_import -typedef void(*grpc_auth_context_add_property_type)(grpc_auth_context *ctx, const char *name, const char *value, size_t value_length); +typedef void(*grpc_auth_context_add_property_type)(grpc_auth_context* ctx, const char* name, const char* value, size_t value_length); extern grpc_auth_context_add_property_type grpc_auth_context_add_property_import; #define grpc_auth_context_add_property grpc_auth_context_add_property_import -typedef void(*grpc_auth_context_add_cstring_property_type)(grpc_auth_context *ctx, const char *name, const char *value); +typedef void(*grpc_auth_context_add_cstring_property_type)(grpc_auth_context* ctx, const char* name, const char* value); extern grpc_auth_context_add_cstring_property_type grpc_auth_context_add_cstring_property_import; #define grpc_auth_context_add_cstring_property grpc_auth_context_add_cstring_property_import -typedef int(*grpc_auth_context_set_peer_identity_property_name_type)(grpc_auth_context *ctx, const char *name); +typedef int(*grpc_auth_context_set_peer_identity_property_name_type)(grpc_auth_context* ctx, const char* name); extern grpc_auth_context_set_peer_identity_property_name_type grpc_auth_context_set_peer_identity_property_name_import; #define grpc_auth_context_set_peer_identity_property_name grpc_auth_context_set_peer_identity_property_name_import -typedef void(*grpc_channel_credentials_release_type)(grpc_channel_credentials *creds); +typedef void(*grpc_channel_credentials_release_type)(grpc_channel_credentials* creds); extern grpc_channel_credentials_release_type grpc_channel_credentials_release_import; #define grpc_channel_credentials_release grpc_channel_credentials_release_import -typedef grpc_channel_credentials *(*grpc_google_default_credentials_create_type)(void); +typedef grpc_channel_credentials*(*grpc_google_default_credentials_create_type)(void); extern grpc_google_default_credentials_create_type grpc_google_default_credentials_create_import; #define grpc_google_default_credentials_create grpc_google_default_credentials_create_import typedef void(*grpc_set_ssl_roots_override_callback_type)(grpc_ssl_roots_override_callback cb); extern grpc_set_ssl_roots_override_callback_type grpc_set_ssl_roots_override_callback_import; #define grpc_set_ssl_roots_override_callback grpc_set_ssl_roots_override_callback_import -typedef grpc_channel_credentials *(*grpc_ssl_credentials_create_type)(const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pair, void *reserved); +typedef grpc_channel_credentials*(*grpc_ssl_credentials_create_type)(const char* pem_root_certs, grpc_ssl_pem_key_cert_pair* pem_key_cert_pair, void* reserved); extern grpc_ssl_credentials_create_type grpc_ssl_credentials_create_import; #define grpc_ssl_credentials_create grpc_ssl_credentials_create_import -typedef void(*grpc_call_credentials_release_type)(grpc_call_credentials *creds); +typedef void(*grpc_call_credentials_release_type)(grpc_call_credentials* creds); extern grpc_call_credentials_release_type grpc_call_credentials_release_import; #define grpc_call_credentials_release grpc_call_credentials_release_import -typedef grpc_channel_credentials *(*grpc_composite_channel_credentials_create_type)(grpc_channel_credentials *channel_creds, grpc_call_credentials *call_creds, void *reserved); +typedef grpc_channel_credentials*(*grpc_composite_channel_credentials_create_type)(grpc_channel_credentials* channel_creds, grpc_call_credentials* call_creds, void* reserved); extern grpc_composite_channel_credentials_create_type grpc_composite_channel_credentials_create_import; #define grpc_composite_channel_credentials_create grpc_composite_channel_credentials_create_import -typedef grpc_call_credentials *(*grpc_composite_call_credentials_create_type)(grpc_call_credentials *creds1, grpc_call_credentials *creds2, void *reserved); +typedef grpc_call_credentials*(*grpc_composite_call_credentials_create_type)(grpc_call_credentials* creds1, grpc_call_credentials* creds2, void* reserved); extern grpc_composite_call_credentials_create_type grpc_composite_call_credentials_create_import; #define grpc_composite_call_credentials_create grpc_composite_call_credentials_create_import -typedef grpc_call_credentials *(*grpc_google_compute_engine_credentials_create_type)(void *reserved); +typedef grpc_call_credentials*(*grpc_google_compute_engine_credentials_create_type)(void* reserved); extern grpc_google_compute_engine_credentials_create_type grpc_google_compute_engine_credentials_create_import; #define grpc_google_compute_engine_credentials_create grpc_google_compute_engine_credentials_create_import typedef gpr_timespec(*grpc_max_auth_token_lifetime_type)(); extern grpc_max_auth_token_lifetime_type grpc_max_auth_token_lifetime_import; #define grpc_max_auth_token_lifetime grpc_max_auth_token_lifetime_import -typedef grpc_call_credentials *(*grpc_service_account_jwt_access_credentials_create_type)(const char *json_key, gpr_timespec token_lifetime, void *reserved); +typedef grpc_call_credentials*(*grpc_service_account_jwt_access_credentials_create_type)(const char* json_key, gpr_timespec token_lifetime, void* reserved); extern grpc_service_account_jwt_access_credentials_create_type grpc_service_account_jwt_access_credentials_create_import; #define grpc_service_account_jwt_access_credentials_create grpc_service_account_jwt_access_credentials_create_import -typedef grpc_call_credentials *(*grpc_google_refresh_token_credentials_create_type)(const char *json_refresh_token, void *reserved); +typedef grpc_call_credentials*(*grpc_google_refresh_token_credentials_create_type)(const char* json_refresh_token, void* reserved); extern grpc_google_refresh_token_credentials_create_type grpc_google_refresh_token_credentials_create_import; #define grpc_google_refresh_token_credentials_create grpc_google_refresh_token_credentials_create_import -typedef grpc_call_credentials *(*grpc_access_token_credentials_create_type)(const char *access_token, void *reserved); +typedef grpc_call_credentials*(*grpc_access_token_credentials_create_type)(const char* access_token, void* reserved); extern grpc_access_token_credentials_create_type grpc_access_token_credentials_create_import; #define grpc_access_token_credentials_create grpc_access_token_credentials_create_import -typedef grpc_call_credentials *(*grpc_google_iam_credentials_create_type)(const char *authorization_token, const char *authority_selector, void *reserved); +typedef grpc_call_credentials*(*grpc_google_iam_credentials_create_type)(const char* authorization_token, const char* authority_selector, void* reserved); extern grpc_google_iam_credentials_create_type grpc_google_iam_credentials_create_import; #define grpc_google_iam_credentials_create grpc_google_iam_credentials_create_import -typedef grpc_call_credentials *(*grpc_metadata_credentials_create_from_plugin_type)(grpc_metadata_credentials_plugin plugin, void *reserved); +typedef grpc_call_credentials*(*grpc_metadata_credentials_create_from_plugin_type)(grpc_metadata_credentials_plugin plugin, void* reserved); extern grpc_metadata_credentials_create_from_plugin_type grpc_metadata_credentials_create_from_plugin_import; #define grpc_metadata_credentials_create_from_plugin grpc_metadata_credentials_create_from_plugin_import -typedef grpc_channel *(*grpc_secure_channel_create_type)(grpc_channel_credentials *creds, const char *target, const grpc_channel_args *args, void *reserved); +typedef grpc_channel*(*grpc_secure_channel_create_type)(grpc_channel_credentials* creds, const char* target, const grpc_channel_args* args, void* reserved); extern grpc_secure_channel_create_type grpc_secure_channel_create_import; #define grpc_secure_channel_create grpc_secure_channel_create_import -typedef void(*grpc_server_credentials_release_type)(grpc_server_credentials *creds); +typedef void(*grpc_server_credentials_release_type)(grpc_server_credentials* creds); extern grpc_server_credentials_release_type grpc_server_credentials_release_import; #define grpc_server_credentials_release grpc_server_credentials_release_import -typedef grpc_ssl_server_certificate_config *(*grpc_ssl_server_certificate_config_create_type)(const char *pem_root_certs, const grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs); +typedef grpc_ssl_server_certificate_config*(*grpc_ssl_server_certificate_config_create_type)(const char* pem_root_certs, const grpc_ssl_pem_key_cert_pair* pem_key_cert_pairs, size_t num_key_cert_pairs); extern grpc_ssl_server_certificate_config_create_type grpc_ssl_server_certificate_config_create_import; #define grpc_ssl_server_certificate_config_create grpc_ssl_server_certificate_config_create_import -typedef void(*grpc_ssl_server_certificate_config_destroy_type)(grpc_ssl_server_certificate_config *config); +typedef void(*grpc_ssl_server_certificate_config_destroy_type)(grpc_ssl_server_certificate_config* config); extern grpc_ssl_server_certificate_config_destroy_type grpc_ssl_server_certificate_config_destroy_import; #define grpc_ssl_server_certificate_config_destroy grpc_ssl_server_certificate_config_destroy_import -typedef grpc_server_credentials *(*grpc_ssl_server_credentials_create_type)(const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, int force_client_auth, void *reserved); +typedef grpc_server_credentials*(*grpc_ssl_server_credentials_create_type)(const char* pem_root_certs, grpc_ssl_pem_key_cert_pair* pem_key_cert_pairs, size_t num_key_cert_pairs, int force_client_auth, void* reserved); extern grpc_ssl_server_credentials_create_type grpc_ssl_server_credentials_create_import; #define grpc_ssl_server_credentials_create grpc_ssl_server_credentials_create_import -typedef grpc_server_credentials *(*grpc_ssl_server_credentials_create_ex_type)(const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, grpc_ssl_client_certificate_request_type client_certificate_request, void *reserved); +typedef grpc_server_credentials*(*grpc_ssl_server_credentials_create_ex_type)(const char* pem_root_certs, grpc_ssl_pem_key_cert_pair* pem_key_cert_pairs, size_t num_key_cert_pairs, grpc_ssl_client_certificate_request_type client_certificate_request, void* reserved); extern grpc_ssl_server_credentials_create_ex_type grpc_ssl_server_credentials_create_ex_import; #define grpc_ssl_server_credentials_create_ex grpc_ssl_server_credentials_create_ex_import -typedef grpc_ssl_server_credentials_options *(*grpc_ssl_server_credentials_create_options_using_config_type)(grpc_ssl_client_certificate_request_type client_certificate_request, grpc_ssl_server_certificate_config *certificate_config); +typedef grpc_ssl_server_credentials_options*(*grpc_ssl_server_credentials_create_options_using_config_type)(grpc_ssl_client_certificate_request_type client_certificate_request, grpc_ssl_server_certificate_config* certificate_config); extern grpc_ssl_server_credentials_create_options_using_config_type grpc_ssl_server_credentials_create_options_using_config_import; #define grpc_ssl_server_credentials_create_options_using_config grpc_ssl_server_credentials_create_options_using_config_import -typedef grpc_ssl_server_credentials_options *(*grpc_ssl_server_credentials_create_options_using_config_fetcher_type)(grpc_ssl_client_certificate_request_type client_certificate_request, grpc_ssl_server_certificate_config_callback cb, void *user_data); +typedef grpc_ssl_server_credentials_options*(*grpc_ssl_server_credentials_create_options_using_config_fetcher_type)(grpc_ssl_client_certificate_request_type client_certificate_request, grpc_ssl_server_certificate_config_callback cb, void* user_data); extern grpc_ssl_server_credentials_create_options_using_config_fetcher_type grpc_ssl_server_credentials_create_options_using_config_fetcher_import; #define grpc_ssl_server_credentials_create_options_using_config_fetcher grpc_ssl_server_credentials_create_options_using_config_fetcher_import -typedef void(*grpc_ssl_server_credentials_options_destroy_type)(grpc_ssl_server_credentials_options *options); +typedef void(*grpc_ssl_server_credentials_options_destroy_type)(grpc_ssl_server_credentials_options* options); extern grpc_ssl_server_credentials_options_destroy_type grpc_ssl_server_credentials_options_destroy_import; #define grpc_ssl_server_credentials_options_destroy grpc_ssl_server_credentials_options_destroy_import -typedef grpc_server_credentials *(*grpc_ssl_server_credentials_create_with_options_type)(grpc_ssl_server_credentials_options *options); +typedef grpc_server_credentials*(*grpc_ssl_server_credentials_create_with_options_type)(grpc_ssl_server_credentials_options* options); extern grpc_ssl_server_credentials_create_with_options_type grpc_ssl_server_credentials_create_with_options_import; #define grpc_ssl_server_credentials_create_with_options grpc_ssl_server_credentials_create_with_options_import -typedef int(*grpc_server_add_secure_http2_port_type)(grpc_server *server, const char *addr, grpc_server_credentials *creds); +typedef int(*grpc_server_add_secure_http2_port_type)(grpc_server* server, const char* addr, grpc_server_credentials* creds); extern grpc_server_add_secure_http2_port_type grpc_server_add_secure_http2_port_import; #define grpc_server_add_secure_http2_port grpc_server_add_secure_http2_port_import -typedef grpc_call_error(*grpc_call_set_credentials_type)(grpc_call *call, grpc_call_credentials *creds); +typedef grpc_call_error(*grpc_call_set_credentials_type)(grpc_call* call, grpc_call_credentials* creds); extern grpc_call_set_credentials_type grpc_call_set_credentials_import; #define grpc_call_set_credentials grpc_call_set_credentials_import -typedef void(*grpc_server_credentials_set_auth_metadata_processor_type)(grpc_server_credentials *creds, grpc_auth_metadata_processor processor); +typedef void(*grpc_server_credentials_set_auth_metadata_processor_type)(grpc_server_credentials* creds, grpc_auth_metadata_processor processor); extern grpc_server_credentials_set_auth_metadata_processor_type grpc_server_credentials_set_auth_metadata_processor_import; #define grpc_server_credentials_set_auth_metadata_processor grpc_server_credentials_set_auth_metadata_processor_import -typedef grpc_byte_buffer *(*grpc_raw_byte_buffer_create_type)(grpc_slice *slices, size_t nslices); +typedef grpc_byte_buffer*(*grpc_raw_byte_buffer_create_type)(grpc_slice* slices, size_t nslices); extern grpc_raw_byte_buffer_create_type grpc_raw_byte_buffer_create_import; #define grpc_raw_byte_buffer_create grpc_raw_byte_buffer_create_import -typedef grpc_byte_buffer *(*grpc_raw_compressed_byte_buffer_create_type)(grpc_slice *slices, size_t nslices, grpc_compression_algorithm compression); +typedef grpc_byte_buffer*(*grpc_raw_compressed_byte_buffer_create_type)(grpc_slice* slices, size_t nslices, grpc_compression_algorithm compression); extern grpc_raw_compressed_byte_buffer_create_type grpc_raw_compressed_byte_buffer_create_import; #define grpc_raw_compressed_byte_buffer_create grpc_raw_compressed_byte_buffer_create_import -typedef grpc_byte_buffer *(*grpc_byte_buffer_copy_type)(grpc_byte_buffer *bb); +typedef grpc_byte_buffer*(*grpc_byte_buffer_copy_type)(grpc_byte_buffer* bb); extern grpc_byte_buffer_copy_type grpc_byte_buffer_copy_import; #define grpc_byte_buffer_copy grpc_byte_buffer_copy_import -typedef size_t(*grpc_byte_buffer_length_type)(grpc_byte_buffer *bb); +typedef size_t(*grpc_byte_buffer_length_type)(grpc_byte_buffer* bb); extern grpc_byte_buffer_length_type grpc_byte_buffer_length_import; #define grpc_byte_buffer_length grpc_byte_buffer_length_import -typedef void(*grpc_byte_buffer_destroy_type)(grpc_byte_buffer *byte_buffer); +typedef void(*grpc_byte_buffer_destroy_type)(grpc_byte_buffer* byte_buffer); extern grpc_byte_buffer_destroy_type grpc_byte_buffer_destroy_import; #define grpc_byte_buffer_destroy grpc_byte_buffer_destroy_import -typedef int(*grpc_byte_buffer_reader_init_type)(grpc_byte_buffer_reader *reader, grpc_byte_buffer *buffer); +typedef int(*grpc_byte_buffer_reader_init_type)(grpc_byte_buffer_reader* reader, grpc_byte_buffer* buffer); extern grpc_byte_buffer_reader_init_type grpc_byte_buffer_reader_init_import; #define grpc_byte_buffer_reader_init grpc_byte_buffer_reader_init_import -typedef void(*grpc_byte_buffer_reader_destroy_type)(grpc_byte_buffer_reader *reader); +typedef void(*grpc_byte_buffer_reader_destroy_type)(grpc_byte_buffer_reader* reader); extern grpc_byte_buffer_reader_destroy_type grpc_byte_buffer_reader_destroy_import; #define grpc_byte_buffer_reader_destroy grpc_byte_buffer_reader_destroy_import -typedef int(*grpc_byte_buffer_reader_next_type)(grpc_byte_buffer_reader *reader, grpc_slice *slice); +typedef int(*grpc_byte_buffer_reader_next_type)(grpc_byte_buffer_reader* reader, grpc_slice* slice); extern grpc_byte_buffer_reader_next_type grpc_byte_buffer_reader_next_import; #define grpc_byte_buffer_reader_next grpc_byte_buffer_reader_next_import -typedef grpc_slice(*grpc_byte_buffer_reader_readall_type)(grpc_byte_buffer_reader *reader); +typedef grpc_slice(*grpc_byte_buffer_reader_readall_type)(grpc_byte_buffer_reader* reader); extern grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_import; #define grpc_byte_buffer_reader_readall grpc_byte_buffer_reader_readall_import -typedef grpc_byte_buffer *(*grpc_raw_byte_buffer_from_reader_type)(grpc_byte_buffer_reader *reader); +typedef grpc_byte_buffer*(*grpc_raw_byte_buffer_from_reader_type)(grpc_byte_buffer_reader* reader); extern grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import; #define grpc_raw_byte_buffer_from_reader grpc_raw_byte_buffer_from_reader_import typedef grpc_slice(*grpc_slice_ref_type)(grpc_slice s); @@ -433,13 +433,13 @@ extern grpc_slice_unref_type grpc_slice_unref_import; typedef grpc_slice(*grpc_slice_copy_type)(grpc_slice s); extern grpc_slice_copy_type grpc_slice_copy_import; #define grpc_slice_copy grpc_slice_copy_import -typedef grpc_slice(*grpc_slice_new_type)(void *p, size_t len, void (*destroy)(void *)); +typedef grpc_slice(*grpc_slice_new_type)(void* p, size_t len, void (*destroy)(void*)); extern grpc_slice_new_type grpc_slice_new_import; #define grpc_slice_new grpc_slice_new_import -typedef grpc_slice(*grpc_slice_new_with_user_data_type)(void *p, size_t len, void (*destroy)(void *), void *user_data); +typedef grpc_slice(*grpc_slice_new_with_user_data_type)(void* p, size_t len, void (*destroy)(void*), void* user_data); extern grpc_slice_new_with_user_data_type grpc_slice_new_with_user_data_import; #define grpc_slice_new_with_user_data grpc_slice_new_with_user_data_import -typedef grpc_slice(*grpc_slice_new_with_len_type)(void *p, size_t len, void (*destroy)(void *, size_t)); +typedef grpc_slice(*grpc_slice_new_with_len_type)(void* p, size_t len, void (*destroy)(void*, size_t)); extern grpc_slice_new_with_len_type grpc_slice_new_with_len_import; #define grpc_slice_new_with_len grpc_slice_new_with_len_import typedef grpc_slice(*grpc_slice_malloc_type)(size_t length); @@ -451,16 +451,16 @@ extern grpc_slice_malloc_large_type grpc_slice_malloc_large_import; typedef grpc_slice(*grpc_slice_intern_type)(grpc_slice slice); extern grpc_slice_intern_type grpc_slice_intern_import; #define grpc_slice_intern grpc_slice_intern_import -typedef grpc_slice(*grpc_slice_from_copied_string_type)(const char *source); +typedef grpc_slice(*grpc_slice_from_copied_string_type)(const char* source); extern grpc_slice_from_copied_string_type grpc_slice_from_copied_string_import; #define grpc_slice_from_copied_string grpc_slice_from_copied_string_import -typedef grpc_slice(*grpc_slice_from_copied_buffer_type)(const char *source, size_t len); +typedef grpc_slice(*grpc_slice_from_copied_buffer_type)(const char* source, size_t len); extern grpc_slice_from_copied_buffer_type grpc_slice_from_copied_buffer_import; #define grpc_slice_from_copied_buffer grpc_slice_from_copied_buffer_import -typedef grpc_slice(*grpc_slice_from_static_string_type)(const char *source); +typedef grpc_slice(*grpc_slice_from_static_string_type)(const char* source); extern grpc_slice_from_static_string_type grpc_slice_from_static_string_import; #define grpc_slice_from_static_string grpc_slice_from_static_string_import -typedef grpc_slice(*grpc_slice_from_static_buffer_type)(const void *source, size_t len); +typedef grpc_slice(*grpc_slice_from_static_buffer_type)(const void* source, size_t len); extern grpc_slice_from_static_buffer_type grpc_slice_from_static_buffer_import; #define grpc_slice_from_static_buffer grpc_slice_from_static_buffer_import typedef grpc_slice(*grpc_slice_sub_type)(grpc_slice s, size_t begin, size_t end); @@ -469,13 +469,13 @@ extern grpc_slice_sub_type grpc_slice_sub_import; typedef grpc_slice(*grpc_slice_sub_no_ref_type)(grpc_slice s, size_t begin, size_t end); extern grpc_slice_sub_no_ref_type grpc_slice_sub_no_ref_import; #define grpc_slice_sub_no_ref grpc_slice_sub_no_ref_import -typedef grpc_slice(*grpc_slice_split_tail_type)(grpc_slice *s, size_t split); +typedef grpc_slice(*grpc_slice_split_tail_type)(grpc_slice* s, size_t split); extern grpc_slice_split_tail_type grpc_slice_split_tail_import; #define grpc_slice_split_tail grpc_slice_split_tail_import -typedef grpc_slice(*grpc_slice_split_tail_maybe_ref_type)(grpc_slice *s, size_t split, grpc_slice_ref_whom ref_whom); +typedef grpc_slice(*grpc_slice_split_tail_maybe_ref_type)(grpc_slice* s, size_t split, grpc_slice_ref_whom ref_whom); extern grpc_slice_split_tail_maybe_ref_type grpc_slice_split_tail_maybe_ref_import; #define grpc_slice_split_tail_maybe_ref grpc_slice_split_tail_maybe_ref_import -typedef grpc_slice(*grpc_slice_split_head_type)(grpc_slice *s, size_t split); +typedef grpc_slice(*grpc_slice_split_head_type)(grpc_slice* s, size_t split); extern grpc_slice_split_head_type grpc_slice_split_head_import; #define grpc_slice_split_head grpc_slice_split_head_import typedef grpc_slice(*grpc_empty_slice_type)(void); @@ -493,13 +493,10 @@ extern grpc_slice_eq_type grpc_slice_eq_import; typedef int(*grpc_slice_cmp_type)(grpc_slice a, grpc_slice b); extern grpc_slice_cmp_type grpc_slice_cmp_import; #define grpc_slice_cmp grpc_slice_cmp_import -typedef int(*grpc_slice_str_cmp_type)(grpc_slice a, const char *b); +typedef int(*grpc_slice_str_cmp_type)(grpc_slice a, const char* b); extern grpc_slice_str_cmp_type grpc_slice_str_cmp_import; #define grpc_slice_str_cmp grpc_slice_str_cmp_import -typedef int(*grpc_slice_buf_cmp_type)(grpc_slice a, const void *b, size_t blen); -extern grpc_slice_buf_cmp_type grpc_slice_buf_cmp_import; -#define grpc_slice_buf_cmp grpc_slice_buf_cmp_import -typedef int(*grpc_slice_buf_start_eq_type)(grpc_slice a, const void *b, size_t blen); +typedef int(*grpc_slice_buf_start_eq_type)(grpc_slice a, const void* b, size_t blen); extern grpc_slice_buf_start_eq_type grpc_slice_buf_start_eq_import; #define grpc_slice_buf_start_eq grpc_slice_buf_start_eq_import typedef int(*grpc_slice_rchr_type)(grpc_slice s, char c); @@ -520,73 +517,73 @@ extern grpc_slice_is_equivalent_type grpc_slice_is_equivalent_import; typedef grpc_slice(*grpc_slice_dup_type)(grpc_slice a); extern grpc_slice_dup_type grpc_slice_dup_import; #define grpc_slice_dup grpc_slice_dup_import -typedef char *(*grpc_slice_to_c_string_type)(grpc_slice s); +typedef char*(*grpc_slice_to_c_string_type)(grpc_slice s); extern grpc_slice_to_c_string_type grpc_slice_to_c_string_import; #define grpc_slice_to_c_string grpc_slice_to_c_string_import -typedef void(*grpc_slice_buffer_init_type)(grpc_slice_buffer *sb); +typedef void(*grpc_slice_buffer_init_type)(grpc_slice_buffer* sb); extern grpc_slice_buffer_init_type grpc_slice_buffer_init_import; #define grpc_slice_buffer_init grpc_slice_buffer_init_import -typedef void(*grpc_slice_buffer_destroy_type)(grpc_slice_buffer *sb); +typedef void(*grpc_slice_buffer_destroy_type)(grpc_slice_buffer* sb); extern grpc_slice_buffer_destroy_type grpc_slice_buffer_destroy_import; #define grpc_slice_buffer_destroy grpc_slice_buffer_destroy_import -typedef void(*grpc_slice_buffer_add_type)(grpc_slice_buffer *sb, grpc_slice slice); +typedef void(*grpc_slice_buffer_add_type)(grpc_slice_buffer* sb, grpc_slice slice); extern grpc_slice_buffer_add_type grpc_slice_buffer_add_import; #define grpc_slice_buffer_add grpc_slice_buffer_add_import -typedef size_t(*grpc_slice_buffer_add_indexed_type)(grpc_slice_buffer *sb, grpc_slice slice); +typedef size_t(*grpc_slice_buffer_add_indexed_type)(grpc_slice_buffer* sb, grpc_slice slice); extern grpc_slice_buffer_add_indexed_type grpc_slice_buffer_add_indexed_import; #define grpc_slice_buffer_add_indexed grpc_slice_buffer_add_indexed_import -typedef void(*grpc_slice_buffer_addn_type)(grpc_slice_buffer *sb, grpc_slice *slices, size_t n); +typedef void(*grpc_slice_buffer_addn_type)(grpc_slice_buffer* sb, grpc_slice* slices, size_t n); extern grpc_slice_buffer_addn_type grpc_slice_buffer_addn_import; #define grpc_slice_buffer_addn grpc_slice_buffer_addn_import -typedef uint8_t *(*grpc_slice_buffer_tiny_add_type)(grpc_slice_buffer *sb, size_t len); +typedef uint8_t*(*grpc_slice_buffer_tiny_add_type)(grpc_slice_buffer* sb, size_t len); extern grpc_slice_buffer_tiny_add_type grpc_slice_buffer_tiny_add_import; #define grpc_slice_buffer_tiny_add grpc_slice_buffer_tiny_add_import -typedef void(*grpc_slice_buffer_pop_type)(grpc_slice_buffer *sb); +typedef void(*grpc_slice_buffer_pop_type)(grpc_slice_buffer* sb); extern grpc_slice_buffer_pop_type grpc_slice_buffer_pop_import; #define grpc_slice_buffer_pop grpc_slice_buffer_pop_import -typedef void(*grpc_slice_buffer_reset_and_unref_type)(grpc_slice_buffer *sb); +typedef void(*grpc_slice_buffer_reset_and_unref_type)(grpc_slice_buffer* sb); extern grpc_slice_buffer_reset_and_unref_type grpc_slice_buffer_reset_and_unref_import; #define grpc_slice_buffer_reset_and_unref grpc_slice_buffer_reset_and_unref_import -typedef void(*grpc_slice_buffer_swap_type)(grpc_slice_buffer *a, grpc_slice_buffer *b); +typedef void(*grpc_slice_buffer_swap_type)(grpc_slice_buffer* a, grpc_slice_buffer* b); extern grpc_slice_buffer_swap_type grpc_slice_buffer_swap_import; #define grpc_slice_buffer_swap grpc_slice_buffer_swap_import -typedef void(*grpc_slice_buffer_move_into_type)(grpc_slice_buffer *src, grpc_slice_buffer *dst); +typedef void(*grpc_slice_buffer_move_into_type)(grpc_slice_buffer* src, grpc_slice_buffer* dst); extern grpc_slice_buffer_move_into_type grpc_slice_buffer_move_into_import; #define grpc_slice_buffer_move_into grpc_slice_buffer_move_into_import -typedef void(*grpc_slice_buffer_trim_end_type)(grpc_slice_buffer *src, size_t n, grpc_slice_buffer *garbage); +typedef void(*grpc_slice_buffer_trim_end_type)(grpc_slice_buffer* src, size_t n, grpc_slice_buffer* garbage); extern grpc_slice_buffer_trim_end_type grpc_slice_buffer_trim_end_import; #define grpc_slice_buffer_trim_end grpc_slice_buffer_trim_end_import -typedef void(*grpc_slice_buffer_move_first_type)(grpc_slice_buffer *src, size_t n, grpc_slice_buffer *dst); +typedef void(*grpc_slice_buffer_move_first_type)(grpc_slice_buffer* src, size_t n, grpc_slice_buffer* dst); extern grpc_slice_buffer_move_first_type grpc_slice_buffer_move_first_import; #define grpc_slice_buffer_move_first grpc_slice_buffer_move_first_import -typedef void(*grpc_slice_buffer_move_first_no_ref_type)(grpc_slice_buffer *src, size_t n, grpc_slice_buffer *dst); +typedef void(*grpc_slice_buffer_move_first_no_ref_type)(grpc_slice_buffer* src, size_t n, grpc_slice_buffer* dst); extern grpc_slice_buffer_move_first_no_ref_type grpc_slice_buffer_move_first_no_ref_import; #define grpc_slice_buffer_move_first_no_ref grpc_slice_buffer_move_first_no_ref_import -typedef void(*grpc_slice_buffer_move_first_into_buffer_type)(grpc_exec_ctx *exec_ctx, grpc_slice_buffer *src, size_t n, void *dst); +typedef void(*grpc_slice_buffer_move_first_into_buffer_type)(grpc_exec_ctx* exec_ctx, grpc_slice_buffer* src, size_t n, void* dst); extern grpc_slice_buffer_move_first_into_buffer_type grpc_slice_buffer_move_first_into_buffer_import; #define grpc_slice_buffer_move_first_into_buffer grpc_slice_buffer_move_first_into_buffer_import -typedef grpc_slice(*grpc_slice_buffer_take_first_type)(grpc_slice_buffer *src); +typedef grpc_slice(*grpc_slice_buffer_take_first_type)(grpc_slice_buffer* src); extern grpc_slice_buffer_take_first_type grpc_slice_buffer_take_first_import; #define grpc_slice_buffer_take_first grpc_slice_buffer_take_first_import -typedef void(*grpc_slice_buffer_undo_take_first_type)(grpc_slice_buffer *src, grpc_slice slice); +typedef void(*grpc_slice_buffer_undo_take_first_type)(grpc_slice_buffer* src, grpc_slice slice); extern grpc_slice_buffer_undo_take_first_type grpc_slice_buffer_undo_take_first_import; #define grpc_slice_buffer_undo_take_first grpc_slice_buffer_undo_take_first_import -typedef void *(*gpr_malloc_type)(size_t size); +typedef void*(*gpr_malloc_type)(size_t size); extern gpr_malloc_type gpr_malloc_import; #define gpr_malloc gpr_malloc_import -typedef void *(*gpr_zalloc_type)(size_t size); +typedef void*(*gpr_zalloc_type)(size_t size); extern gpr_zalloc_type gpr_zalloc_import; #define gpr_zalloc gpr_zalloc_import -typedef void(*gpr_free_type)(void *ptr); +typedef void(*gpr_free_type)(void* ptr); extern gpr_free_type gpr_free_import; #define gpr_free gpr_free_import -typedef void *(*gpr_realloc_type)(void *p, size_t size); +typedef void*(*gpr_realloc_type)(void* p, size_t size); extern gpr_realloc_type gpr_realloc_import; #define gpr_realloc gpr_realloc_import -typedef void *(*gpr_malloc_aligned_type)(size_t size, size_t alignment_log); +typedef void*(*gpr_malloc_aligned_type)(size_t size, size_t alignment_log); extern gpr_malloc_aligned_type gpr_malloc_aligned_import; #define gpr_malloc_aligned gpr_malloc_aligned_import -typedef void(*gpr_free_aligned_type)(void *ptr); +typedef void(*gpr_free_aligned_type)(void* ptr); extern gpr_free_aligned_type gpr_free_aligned_import; #define gpr_free_aligned gpr_free_aligned_import typedef void(*gpr_set_allocation_functions_type)(gpr_allocation_functions functions); @@ -595,55 +592,55 @@ extern gpr_set_allocation_functions_type gpr_set_allocation_functions_import; typedef gpr_allocation_functions(*gpr_get_allocation_functions_type)(); extern gpr_get_allocation_functions_type gpr_get_allocation_functions_import; #define gpr_get_allocation_functions gpr_get_allocation_functions_import -typedef gpr_avl(*gpr_avl_create_type)(const gpr_avl_vtable *vtable); +typedef gpr_avl(*gpr_avl_create_type)(const gpr_avl_vtable* vtable); extern gpr_avl_create_type gpr_avl_create_import; #define gpr_avl_create gpr_avl_create_import -typedef gpr_avl(*gpr_avl_ref_type)(gpr_avl avl, void *user_data); +typedef gpr_avl(*gpr_avl_ref_type)(gpr_avl avl, void* user_data); extern gpr_avl_ref_type gpr_avl_ref_import; #define gpr_avl_ref gpr_avl_ref_import -typedef void(*gpr_avl_unref_type)(gpr_avl avl, void *user_data); +typedef void(*gpr_avl_unref_type)(gpr_avl avl, void* user_data); extern gpr_avl_unref_type gpr_avl_unref_import; #define gpr_avl_unref gpr_avl_unref_import -typedef gpr_avl(*gpr_avl_add_type)(gpr_avl avl, void *key, void *value, void *user_data); +typedef gpr_avl(*gpr_avl_add_type)(gpr_avl avl, void* key, void* value, void* user_data); extern gpr_avl_add_type gpr_avl_add_import; #define gpr_avl_add gpr_avl_add_import -typedef gpr_avl(*gpr_avl_remove_type)(gpr_avl avl, void *key, void *user_data); +typedef gpr_avl(*gpr_avl_remove_type)(gpr_avl avl, void* key, void* user_data); extern gpr_avl_remove_type gpr_avl_remove_import; #define gpr_avl_remove gpr_avl_remove_import -typedef void *(*gpr_avl_get_type)(gpr_avl avl, void *key, void *user_data); +typedef void*(*gpr_avl_get_type)(gpr_avl avl, void* key, void* user_data); extern gpr_avl_get_type gpr_avl_get_import; #define gpr_avl_get gpr_avl_get_import -typedef int(*gpr_avl_maybe_get_type)(gpr_avl avl, void *key, void **value, void *user_data); +typedef int(*gpr_avl_maybe_get_type)(gpr_avl avl, void* key, void** value, void* user_data); extern gpr_avl_maybe_get_type gpr_avl_maybe_get_import; #define gpr_avl_maybe_get gpr_avl_maybe_get_import typedef int(*gpr_avl_is_empty_type)(gpr_avl avl); extern gpr_avl_is_empty_type gpr_avl_is_empty_import; #define gpr_avl_is_empty gpr_avl_is_empty_import -typedef gpr_cmdline *(*gpr_cmdline_create_type)(const char *description); +typedef gpr_cmdline*(*gpr_cmdline_create_type)(const char* description); extern gpr_cmdline_create_type gpr_cmdline_create_import; #define gpr_cmdline_create gpr_cmdline_create_import -typedef void(*gpr_cmdline_add_int_type)(gpr_cmdline *cl, const char *name, const char *help, int *value); +typedef void(*gpr_cmdline_add_int_type)(gpr_cmdline* cl, const char* name, const char* help, int* value); extern gpr_cmdline_add_int_type gpr_cmdline_add_int_import; #define gpr_cmdline_add_int gpr_cmdline_add_int_import -typedef void(*gpr_cmdline_add_flag_type)(gpr_cmdline *cl, const char *name, const char *help, int *value); +typedef void(*gpr_cmdline_add_flag_type)(gpr_cmdline* cl, const char* name, const char* help, int* value); extern gpr_cmdline_add_flag_type gpr_cmdline_add_flag_import; #define gpr_cmdline_add_flag gpr_cmdline_add_flag_import -typedef void(*gpr_cmdline_add_string_type)(gpr_cmdline *cl, const char *name, const char *help, char **value); +typedef void(*gpr_cmdline_add_string_type)(gpr_cmdline* cl, const char* name, const char* help, const char** value); extern gpr_cmdline_add_string_type gpr_cmdline_add_string_import; #define gpr_cmdline_add_string gpr_cmdline_add_string_import -typedef void(*gpr_cmdline_on_extra_arg_type)(gpr_cmdline *cl, const char *name, const char *help, void (*on_extra_arg)(void *user_data, const char *arg), void *user_data); +typedef void(*gpr_cmdline_on_extra_arg_type)(gpr_cmdline* cl, const char* name, const char* help, void (*on_extra_arg)(void* user_data, const char* arg), void* user_data); extern gpr_cmdline_on_extra_arg_type gpr_cmdline_on_extra_arg_import; #define gpr_cmdline_on_extra_arg gpr_cmdline_on_extra_arg_import -typedef void(*gpr_cmdline_set_survive_failure_type)(gpr_cmdline *cl); +typedef void(*gpr_cmdline_set_survive_failure_type)(gpr_cmdline* cl); extern gpr_cmdline_set_survive_failure_type gpr_cmdline_set_survive_failure_import; #define gpr_cmdline_set_survive_failure gpr_cmdline_set_survive_failure_import -typedef int(*gpr_cmdline_parse_type)(gpr_cmdline *cl, int argc, char **argv); +typedef int(*gpr_cmdline_parse_type)(gpr_cmdline* cl, int argc, char** argv); extern gpr_cmdline_parse_type gpr_cmdline_parse_import; #define gpr_cmdline_parse gpr_cmdline_parse_import -typedef void(*gpr_cmdline_destroy_type)(gpr_cmdline *cl); +typedef void(*gpr_cmdline_destroy_type)(gpr_cmdline* cl); extern gpr_cmdline_destroy_type gpr_cmdline_destroy_import; #define gpr_cmdline_destroy gpr_cmdline_destroy_import -typedef char *(*gpr_cmdline_usage_string_type)(gpr_cmdline *cl, const char *argv0); +typedef char*(*gpr_cmdline_usage_string_type)(gpr_cmdline* cl, const char* argv0); extern gpr_cmdline_usage_string_type gpr_cmdline_usage_string_import; #define gpr_cmdline_usage_string gpr_cmdline_usage_string_import typedef unsigned(*gpr_cpu_num_cores_type)(void); @@ -652,64 +649,64 @@ extern gpr_cpu_num_cores_type gpr_cpu_num_cores_import; typedef unsigned(*gpr_cpu_current_cpu_type)(void); extern gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import; #define gpr_cpu_current_cpu gpr_cpu_current_cpu_import -typedef gpr_histogram *(*gpr_histogram_create_type)(double resolution, double max_bucket_start); +typedef gpr_histogram*(*gpr_histogram_create_type)(double resolution, double max_bucket_start); extern gpr_histogram_create_type gpr_histogram_create_import; #define gpr_histogram_create gpr_histogram_create_import -typedef void(*gpr_histogram_destroy_type)(gpr_histogram *h); +typedef void(*gpr_histogram_destroy_type)(gpr_histogram* h); extern gpr_histogram_destroy_type gpr_histogram_destroy_import; #define gpr_histogram_destroy gpr_histogram_destroy_import -typedef void(*gpr_histogram_add_type)(gpr_histogram *h, double x); +typedef void(*gpr_histogram_add_type)(gpr_histogram* h, double x); extern gpr_histogram_add_type gpr_histogram_add_import; #define gpr_histogram_add gpr_histogram_add_import -typedef int(*gpr_histogram_merge_type)(gpr_histogram *dst, const gpr_histogram *src); +typedef int(*gpr_histogram_merge_type)(gpr_histogram* dst, const gpr_histogram* src); extern gpr_histogram_merge_type gpr_histogram_merge_import; #define gpr_histogram_merge gpr_histogram_merge_import -typedef double(*gpr_histogram_percentile_type)(gpr_histogram *histogram, double percentile); +typedef double(*gpr_histogram_percentile_type)(gpr_histogram* histogram, double percentile); extern gpr_histogram_percentile_type gpr_histogram_percentile_import; #define gpr_histogram_percentile gpr_histogram_percentile_import -typedef double(*gpr_histogram_mean_type)(gpr_histogram *histogram); +typedef double(*gpr_histogram_mean_type)(gpr_histogram* histogram); extern gpr_histogram_mean_type gpr_histogram_mean_import; #define gpr_histogram_mean gpr_histogram_mean_import -typedef double(*gpr_histogram_stddev_type)(gpr_histogram *histogram); +typedef double(*gpr_histogram_stddev_type)(gpr_histogram* histogram); extern gpr_histogram_stddev_type gpr_histogram_stddev_import; #define gpr_histogram_stddev gpr_histogram_stddev_import -typedef double(*gpr_histogram_variance_type)(gpr_histogram *histogram); +typedef double(*gpr_histogram_variance_type)(gpr_histogram* histogram); extern gpr_histogram_variance_type gpr_histogram_variance_import; #define gpr_histogram_variance gpr_histogram_variance_import -typedef double(*gpr_histogram_maximum_type)(gpr_histogram *histogram); +typedef double(*gpr_histogram_maximum_type)(gpr_histogram* histogram); extern gpr_histogram_maximum_type gpr_histogram_maximum_import; #define gpr_histogram_maximum gpr_histogram_maximum_import -typedef double(*gpr_histogram_minimum_type)(gpr_histogram *histogram); +typedef double(*gpr_histogram_minimum_type)(gpr_histogram* histogram); extern gpr_histogram_minimum_type gpr_histogram_minimum_import; #define gpr_histogram_minimum gpr_histogram_minimum_import -typedef double(*gpr_histogram_count_type)(gpr_histogram *histogram); +typedef double(*gpr_histogram_count_type)(gpr_histogram* histogram); extern gpr_histogram_count_type gpr_histogram_count_import; #define gpr_histogram_count gpr_histogram_count_import -typedef double(*gpr_histogram_sum_type)(gpr_histogram *histogram); +typedef double(*gpr_histogram_sum_type)(gpr_histogram* histogram); extern gpr_histogram_sum_type gpr_histogram_sum_import; #define gpr_histogram_sum gpr_histogram_sum_import -typedef double(*gpr_histogram_sum_of_squares_type)(gpr_histogram *histogram); +typedef double(*gpr_histogram_sum_of_squares_type)(gpr_histogram* histogram); extern gpr_histogram_sum_of_squares_type gpr_histogram_sum_of_squares_import; #define gpr_histogram_sum_of_squares gpr_histogram_sum_of_squares_import -typedef const uint32_t *(*gpr_histogram_get_contents_type)(gpr_histogram *histogram, size_t *count); +typedef const uint32_t*(*gpr_histogram_get_contents_type)(gpr_histogram* histogram, size_t* count); extern gpr_histogram_get_contents_type gpr_histogram_get_contents_import; #define gpr_histogram_get_contents gpr_histogram_get_contents_import -typedef void(*gpr_histogram_merge_contents_type)(gpr_histogram *histogram, const uint32_t *data, size_t data_count, double min_seen, double max_seen, double sum, double sum_of_squares, double count); +typedef void(*gpr_histogram_merge_contents_type)(gpr_histogram* histogram, const uint32_t* data, size_t data_count, double min_seen, double max_seen, double sum, double sum_of_squares, double count); extern gpr_histogram_merge_contents_type gpr_histogram_merge_contents_import; #define gpr_histogram_merge_contents gpr_histogram_merge_contents_import -typedef int(*gpr_join_host_port_type)(char **out, const char *host, int port); +typedef int(*gpr_join_host_port_type)(char** out, const char* host, int port); extern gpr_join_host_port_type gpr_join_host_port_import; #define gpr_join_host_port gpr_join_host_port_import -typedef int(*gpr_split_host_port_type)(const char *name, char **host, char **port); +typedef int(*gpr_split_host_port_type)(const char* name, char** host, char** port); extern gpr_split_host_port_type gpr_split_host_port_import; #define gpr_split_host_port gpr_split_host_port_import -typedef const char *(*gpr_log_severity_string_type)(gpr_log_severity severity); +typedef const char*(*gpr_log_severity_string_type)(gpr_log_severity severity); extern gpr_log_severity_string_type gpr_log_severity_string_import; #define gpr_log_severity_string gpr_log_severity_string_import -typedef void(*gpr_log_type)(const char *file, int line, gpr_log_severity severity, const char *format, ...) GPR_PRINT_FORMAT_CHECK(4, 5); +typedef void(*gpr_log_type)(const char* file, int line, gpr_log_severity severity, const char* format, ...) GPR_PRINT_FORMAT_CHECK(4, 5); extern gpr_log_type gpr_log_import; #define gpr_log gpr_log_import -typedef void(*gpr_log_message_type)(const char *file, int line, gpr_log_severity severity, const char *message); +typedef void(*gpr_log_message_type)(const char* file, int line, gpr_log_severity severity, const char* message); extern gpr_log_message_type gpr_log_message_import; #define gpr_log_message gpr_log_message_import typedef void(*gpr_set_log_verbosity_type)(gpr_log_severity min_severity_to_print); @@ -721,118 +718,118 @@ extern gpr_log_verbosity_init_type gpr_log_verbosity_init_import; typedef void(*gpr_set_log_function_type)(gpr_log_func func); extern gpr_set_log_function_type gpr_set_log_function_import; #define gpr_set_log_function gpr_set_log_function_import -typedef char *(*gpr_format_message_type)(int messageid); +typedef char*(*gpr_format_message_type)(int messageid); extern gpr_format_message_type gpr_format_message_import; #define gpr_format_message gpr_format_message_import -typedef char *(*gpr_strdup_type)(const char *src); +typedef char*(*gpr_strdup_type)(const char* src); extern gpr_strdup_type gpr_strdup_import; #define gpr_strdup gpr_strdup_import -typedef int(*gpr_asprintf_type)(char **strp, const char *format, ...) GPR_PRINT_FORMAT_CHECK(2, 3); +typedef int(*gpr_asprintf_type)(char** strp, const char* format, ...) GPR_PRINT_FORMAT_CHECK(2, 3); extern gpr_asprintf_type gpr_asprintf_import; #define gpr_asprintf gpr_asprintf_import -typedef const char *(*gpr_subprocess_binary_extension_type)(); +typedef const char*(*gpr_subprocess_binary_extension_type)(); extern gpr_subprocess_binary_extension_type gpr_subprocess_binary_extension_import; #define gpr_subprocess_binary_extension gpr_subprocess_binary_extension_import -typedef gpr_subprocess *(*gpr_subprocess_create_type)(int argc, const char **argv); +typedef gpr_subprocess*(*gpr_subprocess_create_type)(int argc, const char** argv); extern gpr_subprocess_create_type gpr_subprocess_create_import; #define gpr_subprocess_create gpr_subprocess_create_import -typedef void(*gpr_subprocess_destroy_type)(gpr_subprocess *p); +typedef void(*gpr_subprocess_destroy_type)(gpr_subprocess* p); extern gpr_subprocess_destroy_type gpr_subprocess_destroy_import; #define gpr_subprocess_destroy gpr_subprocess_destroy_import -typedef int(*gpr_subprocess_join_type)(gpr_subprocess *p); +typedef int(*gpr_subprocess_join_type)(gpr_subprocess* p); extern gpr_subprocess_join_type gpr_subprocess_join_import; #define gpr_subprocess_join gpr_subprocess_join_import -typedef void(*gpr_subprocess_interrupt_type)(gpr_subprocess *p); +typedef void(*gpr_subprocess_interrupt_type)(gpr_subprocess* p); extern gpr_subprocess_interrupt_type gpr_subprocess_interrupt_import; #define gpr_subprocess_interrupt gpr_subprocess_interrupt_import -typedef void(*gpr_mu_init_type)(gpr_mu *mu); +typedef void(*gpr_mu_init_type)(gpr_mu* mu); extern gpr_mu_init_type gpr_mu_init_import; #define gpr_mu_init gpr_mu_init_import -typedef void(*gpr_mu_destroy_type)(gpr_mu *mu); +typedef void(*gpr_mu_destroy_type)(gpr_mu* mu); extern gpr_mu_destroy_type gpr_mu_destroy_import; #define gpr_mu_destroy gpr_mu_destroy_import -typedef void(*gpr_mu_lock_type)(gpr_mu *mu); +typedef void(*gpr_mu_lock_type)(gpr_mu* mu); extern gpr_mu_lock_type gpr_mu_lock_import; #define gpr_mu_lock gpr_mu_lock_import -typedef void(*gpr_mu_unlock_type)(gpr_mu *mu); +typedef void(*gpr_mu_unlock_type)(gpr_mu* mu); extern gpr_mu_unlock_type gpr_mu_unlock_import; #define gpr_mu_unlock gpr_mu_unlock_import -typedef int(*gpr_mu_trylock_type)(gpr_mu *mu); +typedef int(*gpr_mu_trylock_type)(gpr_mu* mu); extern gpr_mu_trylock_type gpr_mu_trylock_import; #define gpr_mu_trylock gpr_mu_trylock_import -typedef void(*gpr_cv_init_type)(gpr_cv *cv); +typedef void(*gpr_cv_init_type)(gpr_cv* cv); extern gpr_cv_init_type gpr_cv_init_import; #define gpr_cv_init gpr_cv_init_import -typedef void(*gpr_cv_destroy_type)(gpr_cv *cv); +typedef void(*gpr_cv_destroy_type)(gpr_cv* cv); extern gpr_cv_destroy_type gpr_cv_destroy_import; #define gpr_cv_destroy gpr_cv_destroy_import -typedef int(*gpr_cv_wait_type)(gpr_cv *cv, gpr_mu *mu, gpr_timespec abs_deadline); +typedef int(*gpr_cv_wait_type)(gpr_cv* cv, gpr_mu* mu, gpr_timespec abs_deadline); extern gpr_cv_wait_type gpr_cv_wait_import; #define gpr_cv_wait gpr_cv_wait_import -typedef void(*gpr_cv_signal_type)(gpr_cv *cv); +typedef void(*gpr_cv_signal_type)(gpr_cv* cv); extern gpr_cv_signal_type gpr_cv_signal_import; #define gpr_cv_signal gpr_cv_signal_import -typedef void(*gpr_cv_broadcast_type)(gpr_cv *cv); +typedef void(*gpr_cv_broadcast_type)(gpr_cv* cv); extern gpr_cv_broadcast_type gpr_cv_broadcast_import; #define gpr_cv_broadcast gpr_cv_broadcast_import -typedef void(*gpr_once_init_type)(gpr_once *once, void (*init_routine)(void)); +typedef void(*gpr_once_init_type)(gpr_once* once, void (*init_routine)(void)); extern gpr_once_init_type gpr_once_init_import; #define gpr_once_init gpr_once_init_import -typedef void(*gpr_event_init_type)(gpr_event *ev); +typedef void(*gpr_event_init_type)(gpr_event* ev); extern gpr_event_init_type gpr_event_init_import; #define gpr_event_init gpr_event_init_import -typedef void(*gpr_event_set_type)(gpr_event *ev, void *value); +typedef void(*gpr_event_set_type)(gpr_event* ev, void* value); extern gpr_event_set_type gpr_event_set_import; #define gpr_event_set gpr_event_set_import -typedef void *(*gpr_event_get_type)(gpr_event *ev); +typedef void*(*gpr_event_get_type)(gpr_event* ev); extern gpr_event_get_type gpr_event_get_import; #define gpr_event_get gpr_event_get_import -typedef void *(*gpr_event_wait_type)(gpr_event *ev, gpr_timespec abs_deadline); +typedef void*(*gpr_event_wait_type)(gpr_event* ev, gpr_timespec abs_deadline); extern gpr_event_wait_type gpr_event_wait_import; #define gpr_event_wait gpr_event_wait_import -typedef void(*gpr_ref_init_type)(gpr_refcount *r, int n); +typedef void(*gpr_ref_init_type)(gpr_refcount* r, int n); extern gpr_ref_init_type gpr_ref_init_import; #define gpr_ref_init gpr_ref_init_import -typedef void(*gpr_ref_type)(gpr_refcount *r); +typedef void(*gpr_ref_type)(gpr_refcount* r); extern gpr_ref_type gpr_ref_import; #define gpr_ref gpr_ref_import -typedef void(*gpr_ref_non_zero_type)(gpr_refcount *r); +typedef void(*gpr_ref_non_zero_type)(gpr_refcount* r); extern gpr_ref_non_zero_type gpr_ref_non_zero_import; #define gpr_ref_non_zero gpr_ref_non_zero_import -typedef void(*gpr_refn_type)(gpr_refcount *r, int n); +typedef void(*gpr_refn_type)(gpr_refcount* r, int n); extern gpr_refn_type gpr_refn_import; #define gpr_refn gpr_refn_import -typedef int(*gpr_unref_type)(gpr_refcount *r); +typedef int(*gpr_unref_type)(gpr_refcount* r); extern gpr_unref_type gpr_unref_import; #define gpr_unref gpr_unref_import -typedef int(*gpr_ref_is_unique_type)(gpr_refcount *r); +typedef int(*gpr_ref_is_unique_type)(gpr_refcount* r); extern gpr_ref_is_unique_type gpr_ref_is_unique_import; #define gpr_ref_is_unique gpr_ref_is_unique_import -typedef void(*gpr_stats_init_type)(gpr_stats_counter *c, intptr_t n); +typedef void(*gpr_stats_init_type)(gpr_stats_counter* c, intptr_t n); extern gpr_stats_init_type gpr_stats_init_import; #define gpr_stats_init gpr_stats_init_import -typedef void(*gpr_stats_inc_type)(gpr_stats_counter *c, intptr_t inc); +typedef void(*gpr_stats_inc_type)(gpr_stats_counter* c, intptr_t inc); extern gpr_stats_inc_type gpr_stats_inc_import; #define gpr_stats_inc gpr_stats_inc_import -typedef intptr_t(*gpr_stats_read_type)(const gpr_stats_counter *c); +typedef intptr_t(*gpr_stats_read_type)(const gpr_stats_counter* c); extern gpr_stats_read_type gpr_stats_read_import; #define gpr_stats_read gpr_stats_read_import -typedef int(*gpr_thd_new_type)(gpr_thd_id *t, void (*thd_body)(void *arg), void *arg, const gpr_thd_options *options); +typedef int(*gpr_thd_new_type)(gpr_thd_id* t, void (*thd_body)(void* arg), void* arg, const gpr_thd_options* options); extern gpr_thd_new_type gpr_thd_new_import; #define gpr_thd_new gpr_thd_new_import typedef gpr_thd_options(*gpr_thd_options_default_type)(void); extern gpr_thd_options_default_type gpr_thd_options_default_import; #define gpr_thd_options_default gpr_thd_options_default_import -typedef void(*gpr_thd_options_set_detached_type)(gpr_thd_options *options); +typedef void(*gpr_thd_options_set_detached_type)(gpr_thd_options* options); extern gpr_thd_options_set_detached_type gpr_thd_options_set_detached_import; #define gpr_thd_options_set_detached gpr_thd_options_set_detached_import -typedef void(*gpr_thd_options_set_joinable_type)(gpr_thd_options *options); +typedef void(*gpr_thd_options_set_joinable_type)(gpr_thd_options* options); extern gpr_thd_options_set_joinable_type gpr_thd_options_set_joinable_import; #define gpr_thd_options_set_joinable gpr_thd_options_set_joinable_import -typedef int(*gpr_thd_options_is_detached_type)(const gpr_thd_options *options); +typedef int(*gpr_thd_options_is_detached_type)(const gpr_thd_options* options); extern gpr_thd_options_is_detached_type gpr_thd_options_is_detached_import; #define gpr_thd_options_is_detached gpr_thd_options_is_detached_import -typedef int(*gpr_thd_options_is_joinable_type)(const gpr_thd_options *options); +typedef int(*gpr_thd_options_is_joinable_type)(const gpr_thd_options* options); extern gpr_thd_options_is_joinable_type gpr_thd_options_is_joinable_import; #define gpr_thd_options_is_joinable gpr_thd_options_is_joinable_import typedef gpr_thd_id(*gpr_thd_currentid_type)(void); diff --git a/src/ruby/ext/grpc/rb_server.c b/src/ruby/ext/grpc/rb_server.c index e96de4f2f9..160c1533ba 100644 --- a/src/ruby/ext/grpc/rb_server.c +++ b/src/ruby/ext/grpc/rb_server.c @@ -44,12 +44,12 @@ static VALUE id_insecure_server; /* grpc_rb_server wraps a grpc_server. */ typedef struct grpc_rb_server { /* The actual server */ - grpc_server *wrapped; - grpc_completion_queue *queue; + grpc_server* wrapped; + grpc_completion_queue* queue; gpr_atm shutdown_started; } grpc_rb_server; -static void destroy_server(grpc_rb_server *server, gpr_timespec deadline) { +static void destroy_server(grpc_rb_server* server, gpr_timespec deadline) { grpc_event ev; // This can be started by app or implicitly by GC. Avoid a race between these. if (gpr_atm_full_fetch_add(&server->shutdown_started, (gpr_atm)1) == 0) { @@ -70,13 +70,13 @@ static void destroy_server(grpc_rb_server *server, gpr_timespec deadline) { } /* Destroys server instances. */ -static void grpc_rb_server_free(void *p) { - grpc_rb_server *svr = NULL; +static void grpc_rb_server_free(void* p) { + grpc_rb_server* svr = NULL; gpr_timespec deadline; if (p == NULL) { return; }; - svr = (grpc_rb_server *)p; + svr = (grpc_rb_server*)p; deadline = gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), gpr_time_from_seconds(2, GPR_TIMESPAN)); @@ -105,7 +105,7 @@ static const rb_data_type_t grpc_rb_server_data_type = { /* Allocates grpc_rb_server instances. */ static VALUE grpc_rb_server_alloc(VALUE cls) { - grpc_rb_server *wrapper = ALLOC(grpc_rb_server); + grpc_rb_server* wrapper = ALLOC(grpc_rb_server); wrapper->wrapped = NULL; wrapper->shutdown_started = (gpr_atm)0; return TypedData_Wrap_Struct(cls, &grpc_rb_server_data_type, wrapper); @@ -117,9 +117,9 @@ static VALUE grpc_rb_server_alloc(VALUE cls) { Initializes server instances. */ static VALUE grpc_rb_server_init(VALUE self, VALUE channel_args) { - grpc_completion_queue *cq = NULL; - grpc_rb_server *wrapper = NULL; - grpc_server *srv = NULL; + grpc_completion_queue* cq = NULL; + grpc_rb_server* wrapper = NULL; + grpc_server* srv = NULL; grpc_channel_args args; MEMZERO(&args, grpc_channel_args, 1); @@ -153,7 +153,7 @@ typedef struct request_call_stack { /* grpc_request_call_stack_init ensures the request_call_stack is properly * initialized */ -static void grpc_request_call_stack_init(request_call_stack *st) { +static void grpc_request_call_stack_init(request_call_stack* st) { MEMZERO(st, request_call_stack, 1); grpc_metadata_array_init(&st->md_ary); grpc_call_details_init(&st->details); @@ -161,7 +161,7 @@ static void grpc_request_call_stack_init(request_call_stack *st) { /* grpc_request_call_stack_cleanup ensures the request_call_stack is properly * cleaned up */ -static void grpc_request_call_stack_cleanup(request_call_stack *st) { +static void grpc_request_call_stack_cleanup(request_call_stack* st) { grpc_metadata_array_destroy(&st->md_ary); grpc_call_details_destroy(&st->details); } @@ -171,14 +171,14 @@ static void grpc_request_call_stack_cleanup(request_call_stack *st) { Requests notification of a new call on a server. */ static VALUE grpc_rb_server_request_call(VALUE self) { - grpc_rb_server *s = NULL; - grpc_call *call = NULL; + grpc_rb_server* s = NULL; + grpc_call* call = NULL; grpc_event ev; grpc_call_error err; request_call_stack st; VALUE result; - void *tag = (void *)&st; - grpc_completion_queue *call_queue = + void* tag = (void*)&st; + grpc_completion_queue* call_queue = grpc_completion_queue_create_for_pluck(NULL); gpr_timespec deadline; @@ -222,7 +222,7 @@ static VALUE grpc_rb_server_request_call(VALUE self) { } static VALUE grpc_rb_server_start(VALUE self) { - grpc_rb_server *s = NULL; + grpc_rb_server* s = NULL; TypedData_Get_Struct(self, grpc_rb_server, &grpc_rb_server_data_type, s); if (s->wrapped == NULL) { rb_raise(rb_eRuntimeError, "destroyed!"); @@ -244,10 +244,10 @@ static VALUE grpc_rb_server_start(VALUE self) { server.destroy(timeout) Destroys server instances. */ -static VALUE grpc_rb_server_destroy(int argc, VALUE *argv, VALUE self) { +static VALUE grpc_rb_server_destroy(int argc, VALUE* argv, VALUE self) { VALUE timeout = Qnil; gpr_timespec deadline; - grpc_rb_server *s = NULL; + grpc_rb_server* s = NULL; /* "01" == 0 mandatory args, 1 (timeout) is optional */ rb_scan_args(argc, argv, "01", &timeout); @@ -277,8 +277,8 @@ static VALUE grpc_rb_server_destroy(int argc, VALUE *argv, VALUE self) { Adds a http2 port to server */ static VALUE grpc_rb_server_add_http2_port(VALUE self, VALUE port, VALUE rb_creds) { - grpc_rb_server *s = NULL; - grpc_server_credentials *creds = NULL; + grpc_rb_server* s = NULL; + grpc_server_credentials* creds = NULL; int recvd_port = 0; TypedData_Get_Struct(self, grpc_rb_server, &grpc_rb_server_data_type, s); @@ -335,8 +335,8 @@ void Init_grpc_server() { } /* Gets the wrapped server from the ruby wrapper */ -grpc_server *grpc_rb_get_wrapped_server(VALUE v) { - grpc_rb_server *wrapper = NULL; +grpc_server* grpc_rb_get_wrapped_server(VALUE v) { + grpc_rb_server* wrapper = NULL; TypedData_Get_Struct(v, grpc_rb_server, &grpc_rb_server_data_type, wrapper); return wrapper->wrapped; } diff --git a/src/ruby/ext/grpc/rb_server_credentials.c b/src/ruby/ext/grpc/rb_server_credentials.c index 6d7b54c5d6..368d5c2fd8 100644 --- a/src/ruby/ext/grpc/rb_server_credentials.c +++ b/src/ruby/ext/grpc/rb_server_credentials.c @@ -38,16 +38,16 @@ typedef struct grpc_rb_server_credentials { /* Holder of ruby objects involved in constructing the server credentials */ VALUE mark; /* The actual server credentials */ - grpc_server_credentials *wrapped; + grpc_server_credentials* wrapped; } grpc_rb_server_credentials; /* Destroys the server credentials instances. */ -static void grpc_rb_server_credentials_free(void *p) { - grpc_rb_server_credentials *wrapper = NULL; +static void grpc_rb_server_credentials_free(void* p) { + grpc_rb_server_credentials* wrapper = NULL; if (p == NULL) { return; }; - wrapper = (grpc_rb_server_credentials *)p; + wrapper = (grpc_rb_server_credentials*)p; /* Delete the wrapped object if the mark object is Qnil, which indicates that no other object is the actual owner. */ @@ -60,12 +60,12 @@ static void grpc_rb_server_credentials_free(void *p) { } /* Protects the mark object from GC */ -static void grpc_rb_server_credentials_mark(void *p) { - grpc_rb_server_credentials *wrapper = NULL; +static void grpc_rb_server_credentials_mark(void* p) { + grpc_rb_server_credentials* wrapper = NULL; if (p == NULL) { return; } - wrapper = (grpc_rb_server_credentials *)p; + wrapper = (grpc_rb_server_credentials*)p; /* If it's not already cleaned up, mark the mark object */ if (wrapper->mark != Qnil) { @@ -90,7 +90,7 @@ static const rb_data_type_t grpc_rb_server_credentials_data_type = { Provides safe initial defaults for the instance fields. */ static VALUE grpc_rb_server_credentials_alloc(VALUE cls) { - grpc_rb_server_credentials *wrapper = ALLOC(grpc_rb_server_credentials); + grpc_rb_server_credentials* wrapper = ALLOC(grpc_rb_server_credentials); wrapper->wrapped = NULL; wrapper->mark = Qnil; return TypedData_Wrap_Struct(cls, &grpc_rb_server_credentials_data_type, @@ -128,9 +128,9 @@ static VALUE sym_private_key; static VALUE grpc_rb_server_credentials_init(VALUE self, VALUE pem_root_certs, VALUE pem_key_certs, VALUE force_client_auth) { - grpc_rb_server_credentials *wrapper = NULL; - grpc_server_credentials *creds = NULL; - grpc_ssl_pem_key_cert_pair *key_cert_pairs = NULL; + grpc_rb_server_credentials* wrapper = NULL; + grpc_server_credentials* creds = NULL; + grpc_ssl_pem_key_cert_pair* key_cert_pairs = NULL; VALUE cert = Qnil; VALUE key = Qnil; VALUE key_cert = Qnil; @@ -235,8 +235,8 @@ void Init_grpc_server_credentials() { } /* Gets the wrapped grpc_server_credentials from the ruby wrapper */ -grpc_server_credentials *grpc_rb_get_wrapped_server_credentials(VALUE v) { - grpc_rb_server_credentials *wrapper = NULL; +grpc_server_credentials* grpc_rb_get_wrapped_server_credentials(VALUE v) { + grpc_rb_server_credentials* wrapper = NULL; TypedData_Get_Struct(v, grpc_rb_server_credentials, &grpc_rb_server_credentials_data_type, wrapper); return wrapper->wrapped; |