Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/ruby/ext/grpc/rb_call.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ static const rb_data_type_t grpc_call_data_type = {"grpc_call",
{NULL, NULL}},
NULL,
NULL,
RUBY_TYPED_FREE_IMMEDIATELY
};
RUBY_TYPED_FREE_IMMEDIATELY};

/* Error code details is a hash containing text strings describing errors */
VALUE rb_error_code_details;
Expand Down
3 changes: 1 addition & 2 deletions src/ruby/ext/grpc/rb_call_credentials.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,7 @@ static rb_data_type_t grpc_rb_call_credentials_data_type = {
{NULL, NULL}},
NULL,
NULL,
RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED
};
RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED};

/* Allocates CallCredentials instances.
Provides safe initial defaults for the instance fields. */
Expand Down
21 changes: 11 additions & 10 deletions src/ruby/ext/grpc/rb_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ typedef struct bg_watched_channel {

/* grpc_rb_channel wraps a grpc_channel. */
typedef struct grpc_rb_channel {
/* Ruby VALUE that must be written using RB_OBJ_WRITE for proper write barriers */
/* Ruby VALUE that must be written using RB_OBJ_WRITE for proper write
* barriers */
VALUE credentials;
grpc_channel_args args;
/* The actual channel (protected in a wrapper to tell when it's safe to
Expand Down Expand Up @@ -182,15 +183,15 @@ static void grpc_rb_channel_mark(void* p) {
}
}

static rb_data_type_t grpc_channel_data_type = {"grpc_channel",
{grpc_rb_channel_mark,
grpc_rb_channel_free,
GRPC_RB_MEMSIZE_UNAVAILABLE,
{NULL, NULL}},
NULL,
NULL,
RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED
};
static rb_data_type_t grpc_channel_data_type = {
"grpc_channel",
{grpc_rb_channel_mark,
grpc_rb_channel_free,
GRPC_RB_MEMSIZE_UNAVAILABLE,
{NULL, NULL}},
NULL,
NULL,
RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED};

/* Allocates grpc_rb_channel instances. */
static VALUE grpc_rb_channel_alloc(VALUE cls) {
Expand Down
3 changes: 1 addition & 2 deletions src/ruby/ext/grpc/rb_channel_args.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ static rb_data_type_t grpc_rb_channel_args_data_type = {
{NULL, NULL}},
NULL,
NULL,
RUBY_TYPED_FREE_IMMEDIATELY
};
RUBY_TYPED_FREE_IMMEDIATELY};

/* A callback the processes the hash key values in channel_args hash */
static int grpc_rb_channel_create_in_process_add_args_hash_cb(VALUE key,
Expand Down
3 changes: 1 addition & 2 deletions src/ruby/ext/grpc/rb_channel_credentials.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ static rb_data_type_t grpc_rb_channel_credentials_data_type = {
{NULL, NULL}},
NULL,
NULL,
RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED
};
RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED};

/* Allocates ChannelCredential instances.
Provides safe initial defaults for the instance fields. */
Expand Down
3 changes: 1 addition & 2 deletions src/ruby/ext/grpc/rb_compression_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ static rb_data_type_t grpc_rb_compression_options_data_type = {
{NULL, NULL}},
NULL,
NULL,
RUBY_TYPED_FREE_IMMEDIATELY
};
RUBY_TYPED_FREE_IMMEDIATELY};

/* Allocates CompressionOptions instances.
Allocate the wrapped grpc compression options and
Expand Down
3 changes: 1 addition & 2 deletions src/ruby/ext/grpc/rb_grpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ static rb_data_type_t grpc_rb_timespec_data_type = {
{NULL, NULL}},
NULL,
NULL,
RUBY_TYPED_FREE_IMMEDIATELY
};
RUBY_TYPED_FREE_IMMEDIATELY};

/* Alloc func that blocks allocation of a given object by raising an
* exception. */
Expand Down
3 changes: 1 addition & 2 deletions src/ruby/ext/grpc/rb_server_credentials.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ static const rb_data_type_t grpc_rb_server_credentials_data_type = {
{NULL, NULL}},
NULL,
NULL,
RUBY_TYPED_FREE_IMMEDIATELY
};
RUBY_TYPED_FREE_IMMEDIATELY};

/* Allocates ServerCredential instances.
Provides safe initial defaults for the instance fields. */
Expand Down
3 changes: 1 addition & 2 deletions src/ruby/ext/grpc/rb_xds_channel_credentials.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ static rb_data_type_t grpc_rb_xds_channel_credentials_data_type = {
GRPC_RB_MEMSIZE_UNAVAILABLE, NULL},
NULL,
NULL,
RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED
};
RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED};

/* Allocates ChannelCredential instances.
Provides safe initial defaults for the instance fields. */
Expand Down
3 changes: 1 addition & 2 deletions src/ruby/ext/grpc/rb_xds_server_credentials.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ static const rb_data_type_t grpc_rb_xds_server_credentials_data_type = {
GRPC_RB_MEMSIZE_UNAVAILABLE, NULL},
NULL,
NULL,
RUBY_TYPED_FREE_IMMEDIATELY
};
RUBY_TYPED_FREE_IMMEDIATELY};

/* Allocates ServerCredential instances.
Provides safe initial defaults for the instance fields. */
Expand Down