Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: perlxs and gcc error (use more Perl)

by jsegal (Friar)
on Feb 11, 2003 at 16:54 UTC ( [id://234453]=note: print w/replies, xml ) Need Help??


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

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://234453]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-03-28 12:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found