
Help with Embedding and Arrays of Arrays?
Greetings
I'm trying create a simple Perl embedding class for
a C++/Perl application a friend of mine is writing.
One of the data structures I think he is using is
an array of arrays (a 2D array). I know how to
dereference an individual element in Perl code, but
I'm having trouble doing it in C++ code using the
Perl api. So, if anybody out there is really good
with the Perl C api, maybe you could help me with
this vexing issue.
Right now, I'm using get_av() to get an AV* from the
Perl variable name. That works fine. Then, I'm using
av_fetch() to retrieve an element from the array,
which should be a reference to another array (e.g.
the first row). So, I take the SV* that I got from
av_fetch(), and convert it to a reference RV* with
SvRV(). Then, ... ... I'm stumped. I cannot find a
way to convert the RV* reference to an array into an
AV* that I can use.
Thanks for any help or advice you can give...
...nz