in reply to Pass a Perl aref to C, work on it, and get it back as a Perl array

I want to clarify my reasoning behind this. In Perl, I needed to pass in an unsigned char * to a C function (hence the aref, I just haven't changed it to use pack() or the like yet).

Then, I needed to get the return from that C function (a modified version of the unsigned char *), and return it as something that the Perl caller would be able to use (a list).

I do not know enough about the whole process to understand whether there's a simpler or more elegant way to do what I needed to do, and based on my (first couple of passes at) reading perlxs, perlapi, perlguts and Inline::C, that's what I came up with.