diff options
author | Yuki Yugui Sonoda <yugui@yugui.jp> | 2015-04-10 19:47:27 +0900 |
---|---|---|
committer | Yuki Yugui Sonoda <yugui@yugui.jp> | 2015-04-10 22:36:49 +0900 |
commit | d241bcc03042e7b9a86f963c22b23f1bc4226e3c (patch) | |
tree | 79f6dc3eb37c89c694b819165eaff02c732f00ad /src/ruby/ext/grpc/rb_channel_args.c | |
parent | e2ecc508415b95526563eb7b70510e015b9a004e (diff) |
Avoid identifiers reserved by Ruby
"prefix `rb` shows that it belongs to `ruby`". [RHG]
`rb` is a prefix to prevent exported symbols in libruby from
conflicting with symbols in other libraries, in particular,
dynamically loaded Ruby extension libraries.
So the prefix is reserved by Ruby by convention.
For gRPC, simply "grpc_" would be a better prefix.
[RHG]: Minero Aoki. "The Ruby Hacking Guide" (2002), chapter 4
Diffstat (limited to 'src/ruby/ext/grpc/rb_channel_args.c')
-rw-r--r-- | src/ruby/ext/grpc/rb_channel_args.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ruby/ext/grpc/rb_channel_args.c b/src/ruby/ext/grpc/rb_channel_args.c index 532ee5e785..6e486a57c3 100644 --- a/src/ruby/ext/grpc/rb_channel_args.c +++ b/src/ruby/ext/grpc/rb_channel_args.c @@ -109,7 +109,7 @@ typedef struct channel_convert_params { static VALUE grpc_rb_hash_convert_to_channel_args0(VALUE as_value) { ID id_size = rb_intern("size"); - VALUE rb_cChannelArgs = rb_define_class("TmpChannelArgs", rb_cObject); + VALUE grpc_cChannelArgs = rb_define_class("TmpChannelArgs", rb_cObject); channel_convert_params* params = (channel_convert_params*)as_value; size_t num_args = 0; @@ -126,7 +126,7 @@ static VALUE grpc_rb_hash_convert_to_channel_args0(VALUE as_value) { MEMZERO(params->dst->args, grpc_arg, num_args); rb_hash_foreach(params->src_hash, grpc_rb_channel_create_in_process_add_args_hash_cb, - Data_Wrap_Struct(rb_cChannelArgs, GC_NOT_MARKED, + Data_Wrap_Struct(grpc_cChannelArgs, GC_NOT_MARKED, GC_DONT_FREE, params->dst)); /* reset num_args as grpc_rb_channel_create_in_process_add_args_hash_cb * decrements it during has processing */ |