diff options
author | Chris Fallin <cfallin@google.com> | 2015-02-02 13:16:57 -0800 |
---|---|---|
committer | Chris Fallin <cfallin@google.com> | 2015-02-02 13:16:57 -0800 |
commit | a3953da536751f2a77de0553b566bde5e8b5aa1e (patch) | |
tree | d9f410cbdfd3859f6c3abff25abbb5df8122cfcf /ruby/ext | |
parent | eb33f9d3d6f1f78ee70f4bea4326adaf035e1e67 (diff) |
Updated based on code-review comments.
Diffstat (limited to 'ruby/ext')
-rw-r--r-- | ruby/ext/google/protobuf_c/message.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ruby/ext/google/protobuf_c/message.c b/ruby/ext/google/protobuf_c/message.c index d0b09014..7e58a617 100644 --- a/ruby/ext/google/protobuf_c/message.c +++ b/ruby/ext/google/protobuf_c/message.c @@ -88,8 +88,7 @@ static VALUE which_oneof_field(MessageHeader* self, const upb_oneofdef* o) { fields[upb_fielddef_index(first_field)].case_offset; uint32_t oneof_case = *((uint32_t*)(Message_data(self) + case_ofs)); - // oneof_case == 0 indicates no field set. - if (oneof_case == 0) { + if (oneof_case == ONEOF_CASE_NONE) { return Qnil; } |