dvidelabs / flatcc

FlatBuffers Compiler and Library in C for C
Apache License 2.0
631 stars 180 forks source link

How to correctly construct vectors for fixed length arrays? #268

Closed xianglin1998 closed 8 months ago

xianglin1998 commented 8 months ago

I tried to use Flatcc to build vectors that store fixed length arrays, but after the serialized data was deserialized by Python, I printed these fixed length arrays, them all with 0.

test.fbs: struct Key6Bytes { bytes: [uint8:6]; } table KeysArray{ keys: [Key6Bytes]; }

I did not find a similar usage in the documentation and example.

@mikkelfj Can you test the above usage? thankyou.

xianglin1998 commented 8 months ago

Resolved, requires the use of: xxxx_push_create(B, bytes)