Alternative:
let mybuf: ptr uint8 = ...
let mybufLenInBytes: int = ...
var s = newSeq[uint8](mybufLenInBytes)
if mybufLenInBytes != 0:
copyMem(addr s[0], mybuf, mybufLenInBytes)
Run
- Casting basics (a few questions) mantielero
- Re: Casting basics (a few questions) dawkot
- Re: Casting basics (a few questions) yglukhov
- Re: Casting basics (a few questions) mantielero
