Files
Petteri Aimonen 6a595279b2 New field descriptor format.
Now field information is stored as a variable-length uint32_t array.
This reduces the minimum size in most cases:

                            old            new
basic field:                10 bytes       4 bytes
repeated field:             10 bytes       8 bytes
field with 12bit tag/size:  16 bytes       8 bytes
field with 16bit tag/size:  16 bytes       16 bytes
field with 32bit tag/size:  28 bytes       16 bytes

Further, now the descriptor size can be increased per-field and per-message,
instead of previous global PB_FIELD_16BIT and PB_FIELD_32BIT.

PB_FIELD_32BIT still affects the pb_size_t type, which is 16-bit by default.
2019-01-25 18:56:34 +02:00

18 lines
537 B
Python

# Test that multiple .proto files don't cause name collisions.
Import("env")
incpath = env.Clone()
incpath.Append(PROTOCPATH = '#multiple_files')
incpath.Append(CPPPATH = '$BUILD/multiple_files')
incpath.NanopbProto(["multifile1", "multifile1.options"])
incpath.NanopbProto("multifile2")
incpath.NanopbProto("subdir/multifile2")
test = incpath.Program(["test_multiple_files.c", "multifile1.pb.c",
"multifile2.pb.c", "subdir/multifile2.pb.c",
"$COMMON/pb_common.o"])
env.RunTest(test)