diff options
author | Craig Tiller <ctiller@google.com> | 2015-03-05 15:45:46 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-03-05 15:45:46 -0800 |
commit | 68de8e91cc8e991b7f70c0ce988dcc8e1488a187 (patch) | |
tree | 9870605ed36886b10ffc50d9b7af23280bebcf25 /src/ruby | |
parent | 0642863b7338e031ae3ab34aede53a2f764380fd (diff) | |
parent | 2f364c0bb00b07e7f841809d266d53ab5c18b358 (diff) |
Merge github.com:grpc/grpc into credit
Diffstat (limited to 'src/ruby')
-rw-r--r-- | src/ruby/ext/grpc/extconf.rb | 1 | ||||
-rw-r--r-- | src/ruby/ext/grpc/rb_grpc.c | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb index 483a31f60c..f15f85bf56 100644 --- a/src/ruby/ext/grpc/extconf.rb +++ b/src/ruby/ext/grpc/extconf.rb @@ -77,7 +77,6 @@ end dir_config('grpc', HEADER_DIRS, LIB_DIRS) -$CFLAGS << ' -std=c89 ' $CFLAGS << ' -Wno-implicit-function-declaration ' $CFLAGS << ' -Wno-pointer-sign ' $CFLAGS << ' -Wno-return-type ' diff --git a/src/ruby/ext/grpc/rb_grpc.c b/src/ruby/ext/grpc/rb_grpc.c index c7671c8a77..400efd0dfa 100644 --- a/src/ruby/ext/grpc/rb_grpc.c +++ b/src/ruby/ext/grpc/rb_grpc.c @@ -119,12 +119,12 @@ gpr_timespec grpc_rb_time_timeval(VALUE time, int interval) { break; case T_FLOAT: - if (interval && RFLOAT(time)->float_value < 0.0) + if (interval && RFLOAT_VALUE(time) < 0.0) rb_raise(rb_eArgError, "%s must be positive", tstr); else { double f, d; - d = modf(RFLOAT(time)->float_value, &f); + d = modf(RFLOAT_VALUE(time), &f); if (d < 0) { d += 1; f -= 1; @@ -132,7 +132,7 @@ gpr_timespec grpc_rb_time_timeval(VALUE time, int interval) { t.tv_sec = (time_t)f; if (f != t.tv_sec) { rb_raise(rb_eRangeError, "%f out of Time range", - RFLOAT(time)->float_value); + RFLOAT_VALUE(time)); } t.tv_nsec = (time_t)(d * 1e9 + 0.5); } |