|No such thing as a small change
Re: Is this a sane/safe way to pass an aref into a C function? (XS<Perl)by tye (Sage)
|on Jan 22, 2017 at 17:51 UTC
XS code is much more likely to be buggy and fragile than Perl code. If you want to pass a list of bytes from Perl to C, then you would be better off doing it as a data structure that doesn't require your C code to try to deal with Perl data structures. This will also have the side-effect of you having less XS code, which will reduce how many bugs you have to fix and how long it will take you to fix the bugs you have.
So just use: