diff options
author | Tim Emiola <temiola@google.com> | 2015-11-11 15:58:44 -0800 |
---|---|---|
committer | Tim Emiola <temiola@google.com> | 2015-11-12 16:24:13 -0800 |
commit | 9161a82565a0bdaf4622f7f8c8e967d29e904a9c (patch) | |
tree | 9fb3fb67cf41eb556955aa22ec79f400b3a2de91 /src/ruby/ext/grpc/rb_call.c | |
parent | c8bd16b7e14f81c7c6e8be7817ed86b53c4c2cc9 (diff) |
Corrects compile error on ruby 2.0
Diffstat (limited to 'src/ruby/ext/grpc/rb_call.c')
-rw-r--r-- | src/ruby/ext/grpc/rb_call.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/ruby/ext/grpc/rb_call.c b/src/ruby/ext/grpc/rb_call.c index 6b5beb6f5d..40364328ee 100644 --- a/src/ruby/ext/grpc/rb_call.c +++ b/src/ruby/ext/grpc/rb_call.c @@ -139,7 +139,15 @@ static const rb_data_type_t grpc_rb_md_ary_data_type = { {NULL, NULL}}, NULL, NULL, - 0}; +#ifdef RUBY_TYPED_FREE_IMMEDIATELY + /* it is unsafe to specify RUBY_TYPED_FREE_IMMEDIATELY because + * grpc_rb_call_destroy + * touches a hash object. + * TODO(yugui) Directly use st_table and call the free function earlier? + */ + 0, +#endif +}; /* Describes grpc_call struct for RTypedData */ static const rb_data_type_t grpc_call_data_type = { @@ -148,12 +156,15 @@ static const rb_data_type_t grpc_call_data_type = { {NULL, NULL}}, NULL, NULL, +#ifdef RUBY_TYPED_FREE_IMMEDIATELY /* it is unsafe to specify RUBY_TYPED_FREE_IMMEDIATELY because * grpc_rb_call_destroy * touches a hash object. * TODO(yugui) Directly use st_table and call the free function earlier? */ - 0}; + 0, +#endif +}; /* Error code details is a hash containing text strings describing errors */ VALUE rb_error_code_details; |