protobuf-c/t/issue204/issue204.proto
Ilya Lipnitskiy f486c8ed66
protoc-c: add use_oneof_field_name option
Allows for generic oneof offset lookups based on the name of the oneof,
instead of having to know the field name. All oneof fields should have
the same offset, since they are members of a union.

Fixes #204
2021-03-21 21:11:50 -07:00

16 lines
257 B
Protocol Buffer

import "protobuf-c/protobuf-c.proto";
option (pb_c_file).use_oneof_field_name = true;
message two_oneofs {
oneof first_oneof {
bool a = 10;
bool b = 11;
}
oneof second_oneof {
bool c = 20;
bool d = 21;
}
}