in reply to Re: XS Storing AV in HV entry
in thread XS Storing AV in HV entry

This is almost right--you want newRV_noinc, not newRV_inc. The AV you've created already has a refcount of 1, so there's no need to increment it again.

Note that, if only your XS code accesses the array, you can stick the AV directly in. (It works, AVs are supersets of SVs, at least for this purpose) Do not access an array stored like this from perl code, though, as bad things will happen. (core dumps and fatal errors. Not good)