mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2025-01-16 20:41:16 +08:00
20d45b1179
Since we now require protobuf >= 3.0.0, we don't have to support older protobuf versions that don't recognize the `syntax` syntax, so we can put `syntax = "proto2";` on these proto files to silence the protoc compiler's diagnostic "No syntax specified for the proto file".
18 lines
277 B
Protocol Buffer
18 lines
277 B
Protocol Buffer
syntax = "proto2";
|
|
|
|
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;
|
|
}
|
|
}
|