aboutsummaryrefslogtreecommitdiff
path: root/ruby/ext/google/protobuf_c/message.c
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2015-05-18 14:07:21 -0700
committerJoshua Haberman <jhaberman@gmail.com>2015-05-18 14:07:21 -0700
commit202f87f8de182b8d5d35c0ff0f833fcd90c7907c (patch)
treedbfe277bb1089026e1fb85a36717d642e379c570 /ruby/ext/google/protobuf_c/message.c
parent96bf11be8fa2011eba9b68c56f3181568fe48539 (diff)
parentd326277397e345b5bda4a8afbd0a9d54f01b9a06 (diff)
downloadprotobuf-202f87f8de182b8d5d35c0ff0f833fcd90c7907c.tar.gz
protobuf-202f87f8de182b8d5d35c0ff0f833fcd90c7907c.tar.bz2
protobuf-202f87f8de182b8d5d35c0ff0f833fcd90c7907c.zip
Merge pull request #387 from cfallin/ruby-upb-update
Update MRI C Ruby extension to use new version of upb (with upb_env).
Diffstat (limited to 'ruby/ext/google/protobuf_c/message.c')
-rw-r--r--ruby/ext/google/protobuf_c/message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ruby/ext/google/protobuf_c/message.c b/ruby/ext/google/protobuf_c/message.c
index 6e850427..55a674cf 100644
--- a/ruby/ext/google/protobuf_c/message.c
+++ b/ruby/ext/google/protobuf_c/message.c
@@ -86,7 +86,7 @@ static VALUE which_oneof_field(MessageHeader* self, const upb_oneofdef* o) {
size_t case_ofs =
self->descriptor->layout->
fields[upb_fielddef_index(first_field)].case_offset;
- uint32_t oneof_case = *((uint32_t*)(Message_data(self) + case_ofs));
+ uint32_t oneof_case = *((uint32_t*)((char*)Message_data(self) + case_ofs));
if (oneof_case == ONEOF_CASE_NONE) {
return Qnil;