c :: NativeCByteArray :: defaultinit
# An array of `unsigned char` in C (`unsigned char*`)
extern class NativeCByteArray `{ unsigned char* `}
super NativeCArray
redef type E: Byte
# Allocate a new array of `size`
new(size: Int) `{ return calloc(size, sizeof(unsigned char)); `}
redef fun [](index) `{ return self[index]; `}
redef fun []=(index, val) `{ self[index] = val; `}
redef fun +(offset) `{ return self + offset; `}
# Move `n` bytes from `dst_offset` to `src_offset`
fun move(dst_offset, src_offset, n: Int) `{
memmove(self+dst_offset, self+src_offset, n);
`}
end
lib/c/c.nit:191,1--208,3