-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
For now Cstruct handles only strings/bytes when you call "copy/get" for fields with [@len N]
attribute. It would be quite convenient to add something like
[%%cstruct
type qwe = {
field1: uint16_t;
field2: uint64_t [@len 16];
}
]
type myrec = {
myrec1: int;
myrec2: int64 array;
}
let load_struct buf =
let cs_buf = Cstruct.of_bytes buf in
{
myrec1 = get_qwe_field1 cs_buf;
myrec2 = array_qwe_field2 cs_buf;
}
Metadata
Metadata
Assignees
Labels
No labels