Files
Tom Roeder 62afd54964 Add inline allocation of bytes fields
This commit adds a new FT_INLINE allocation type that forces bytes
fields to be inlined into the struct. E.g., pb_byte_t my_bytes[32].
This requires max_size for the bytes field. The FT_INLINE type is
represented as a new LTYPE: FT_LTYPE_FIXED_LENGTH_BYTES.

This commit also updates the documentation with FT_INLINE and
FT_LTYPE_FIXED_LENGTH_BYTES.

Added an AUTHORS file in apparent order of appearance in the git log
history from $(git log --all).
2016-08-04 19:01:43 -04:00

17 lines
363 B
Python

# Test that inlined bytes fields work.
Import("env")
env.NanopbProto("inline")
env.Object("inline.pb.c")
env.Match(["inline.pb.h", "inline.expected"])
p = env.Program(["inline_unittests.c",
"inline.pb.c",
"$COMMON/pb_encode.o",
"$COMMON/pb_decode.o",
"$COMMON/pb_common.o"])
env.RunTest(p)