Implement support for oneofs (C unions).
Basic test included, should probably add an oneof to the AllTypes test also. Update issue 131 Status: Started
This commit is contained in:
18
tests/oneof/oneof.proto
Normal file
18
tests/oneof/oneof.proto
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'nanopb.proto';
|
||||
|
||||
message SubMessage
|
||||
{
|
||||
repeated int32 array = 1 [(nanopb).max_count = 8];
|
||||
}
|
||||
|
||||
message OneOfMessage
|
||||
{
|
||||
required int32 prefix = 1;
|
||||
oneof values
|
||||
{
|
||||
int32 first = 5;
|
||||
string second = 6 [(nanopb).max_size = 8];
|
||||
SubMessage third = 7;
|
||||
}
|
||||
required int32 suffix = 99;
|
||||
}
|
||||
Reference in New Issue
Block a user