Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Calling C++ functions from Perl without using xsubpp

by syphilis (Canon)
on Sep 19, 2012 at 09:24 UTC ( #994434=note: print w/ replies, xml ) Need Help??


in reply to Re: Calling C++ functions from Perl without using xsubpp
in thread Calling C++ functions from Perl without using xsubpp

Inline::C and Co. provide automatic conversion to some set of common types, just like XS does. If using these types is enough, then you don't need anything else but those modules. If you have to work with more complex data structures, then you have to .... learn how to work with XS.

Perhaps I've misread (and inappropriately edited) that excerpt from your post, but it seems to me that you're saying that Inline::C is good only for some limited set of C types.
That's not the case - if it can be done using XS then it can be done using Inline::C. After all, Inline::C is little more than a utility that generates an XS file, which it then compiles.
(I keep thinking there must be *some* feature of XS that Inline::C can't reproduce ... and I'd love to see some examples that validate such thinking.)

Cheers,
Rob


Comment on Re^2: Calling C++ functions from Perl without using xsubpp
Re^3: Calling C++ functions from Perl without using xsubpp
by andal (Friar) on Sep 20, 2012 at 06:56 UTC

    Well, I guess I have expressed myself imprecise. My point was not so much about abilities of Inline::C. My point was about need to learn perl guts if one needs to work with more complex input/output parameters. In this case learning XS comes in mostly for understanding what is happening. Though, probably some people can write code without knowing how their code turns into program :)

      My point was about need to learn perl guts if one needs to work with more complex input/output parameters

      Yes, that is so ... and I probably should have realised that was what you were saying.

      Cheers,
      Rob

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2014-10-22 00:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (112 votes), past polls