Comment #1 on issue 313 by liuj...@google.com: in c++ generated header, has_FIELD will return random results if more than 32 optional fields defined in single message
http://code.google.com/p/protobuf/issues/detail?id=313

This should not happen. What platform are you using? Can you write a simple deomo for this issue? Please upload the .proto and generated .pb.h in question.

We use an array of int32 for HAS_bit. The actually has_ bit is stored in has_array[ (field_index) / 32]. The mask is 1u << (field_index % 32).

BTW, if you use x64 platform in MSVC professional, there was a bug about generating the has bit mask. It's fixed in r402.

--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to