in reply to Re: perlxs and gcc error (use more Perl)
in thread perlxs and gcc error

In addition to tye's great advice, I will also suggest that you check out Inline::C, which makes writing XS code almost transparent. You can just embed C code right in your perl code, and not need to worry about a lot of the niggling details of XS.

I posted a snippet (Pattern for Inline-C-based crunching) to show samples of doing this sort of thing for one-dimensional arrays returning single scalar values. Tye's example is a great way to extend this to get more complex data in and out.

++tye.

--JAS
  • Comment on Re: Re: perlxs and gcc error (use more Perl)

Replies are listed 'Best First'.
Re: Re: Re: perlxs and gcc error (use more Perl)
by sth (Priest) on Feb 11, 2003 at 18:29 UTC

    ...And pick up a copy of "Extending & Embedding Perl". Great Book! It has been a great reference for me.

    STH