by benibela · 6y ago · 0 comments
Makes it easier to take subranges out of it
typedef struct {uint8_t *data, *dataend}
if I'm not mistaken :)With the length you would need to do data += k; length -= k
Especially if you want to use it as safe iterator, you can do data++ in a loop
How would you safely free(data) afterwards? You'd need to keep an alloc'ed pointer somehow.