mirror of
https://github.com/nanopb/nanopb.git
synced 2026-06-06 20:18:31 +00:00
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).
17 lines
363 B
Python
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)
|