dvidelabs / flatcc

FlatBuffers Compiler and Library in C for C
Apache License 2.0
651 stars 189 forks source link

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

Closed xianglin1998 closed 1 year ago

xianglin1998 commented 1 year 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 1 year ago

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