Fix Ruby build

reviewable/pr12708/r1
Muxi Yan 7 years ago
parent 8fa4d15513
commit 532af94e78
  1. 12
      src/ruby/ext/grpc/rb_compression_options.c

@ -127,11 +127,11 @@ grpc_compression_level grpc_rb_compression_options_level_name_to_value_internal(
if (id_compress_level_none == SYM2ID(level_name)) { if (id_compress_level_none == SYM2ID(level_name)) {
return GRPC_COMPRESS_LEVEL_NONE; return GRPC_COMPRESS_LEVEL_NONE;
} else if (id_compress_level_low == SYM2ID(level_name)) { } else if (id_compress_level_low == SYM2ID(level_name)) {
return GRPC_COMPRESS_LEVEL_LOW; return GRPC_COMPRESS_LEVEL_MESSAGE_LOW;
} else if (id_compress_level_medium == SYM2ID(level_name)) { } else if (id_compress_level_medium == SYM2ID(level_name)) {
return GRPC_COMPRESS_LEVEL_MED; return GRPC_COMPRESS_LEVEL_MESSAGE_MED;
} else if (id_compress_level_high == SYM2ID(level_name)) { } else if (id_compress_level_high == SYM2ID(level_name)) {
return GRPC_COMPRESS_LEVEL_HIGH; return GRPC_COMPRESS_LEVEL_MESSAGE_HIGH;
} }
rb_raise(rb_eArgError, rb_raise(rb_eArgError,
@ -264,11 +264,11 @@ VALUE grpc_rb_compression_options_level_value_to_name_internal(
switch (compression_value) { switch (compression_value) {
case GRPC_COMPRESS_LEVEL_NONE: case GRPC_COMPRESS_LEVEL_NONE:
return ID2SYM(id_compress_level_none); return ID2SYM(id_compress_level_none);
case GRPC_COMPRESS_LEVEL_LOW: case GRPC_COMPRESS_LEVEL_MESSAGE_LOW:
return ID2SYM(id_compress_level_low); return ID2SYM(id_compress_level_low);
case GRPC_COMPRESS_LEVEL_MED: case GRPC_COMPRESS_LEVEL_MESSAGE_MED:
return ID2SYM(id_compress_level_medium); return ID2SYM(id_compress_level_medium);
case GRPC_COMPRESS_LEVEL_HIGH: case GRPC_COMPRESS_LEVEL_MESSAGE_HIGH:
return ID2SYM(id_compress_level_high); return ID2SYM(id_compress_level_high);
default: default:
rb_raise( rb_raise(

Loading…
Cancel
Save