Copying data from C-style interface
If you write a primitive operator in C++, use this code as an example of how to copy data to C-style interfaces.
Cast
char *
to int8 *
and then
use assign to copy blocks of datachar * data = ...;
size_t length = ...;
int8 * data_start = static_cast<int8*>(data);
int8 * data_end = data_start +length;
myList.reserve(length);
myList.assign(data_start, data_end);