http://www.perlmonks.org?node_id=268971

RollyGuy has asked for the wisdom of the Perl Monks concerning the following question:

Greetings. I was wondering if anyone knew how to pass an array through a swig interface? I've got regular scalars working just fine and know that I can unroll the array if necessary, but was wondering if there was a better way.
Thanks.

Replies are listed 'Best First'.
Re: Passing Array through SWIG?
by tilly (Archbishop) on Jun 26, 2003 at 06:44 UTC
    I saw it done a few years ago, but the person who did it had to hack up Swig pretty heavily to add the support (and wound up cursing at some of the obvious stupidity. Those patches were not contributed back.

    I don't know whether it has improved since then, but my recommend would be that if you don't have existing code, you want to use XS or Inline instead of Swig.

    Furthermore if you are trying to learn your way around interfacing C and Perl, the definitive reference is Embedding and Extending Perl.