in reply to Extending Perl with C: how to use an array reference?
Especially, how is it possible to avoid the copying part?
I don't know if there's an existing function to do this for you, but you must inevitably convert from an AV to an int* unless you change foo_in_c to work with the AV directly.
On the bright side, I seriously doubt this is as inefficient as think. The time it takes to do the copy is surely dwarfed by the time foo_in_c spends processing it.
You could always make a little helper function if you're concerned about neatness.
|
|---|