I'm testing the LMDB package and I'm stuck. When I retrieve key/value pairs
they are saved to MDB_val structures:
type
Val* = object
mvSize*: csize #*< size of the data item
mvData*: pointer #*< address of the data item
I tried casting the generic pointer (mvData) to a cstring, but the data is not zero terminated so I get garbage attached. Knowing the starting address and number of bytes, what is the best way to capture the data (which is a string in my instance)? Thanks!
