Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Puzzled by the ListUtil.xs in Scalar-List-Utils-1.52.tar.gz

by syphilis (Archbishop)
on Aug 25, 2019 at 00:55 UTC ( [id://11104968]=note: print w/replies, xml ) Need Help??


in reply to Re: Puzzled by the ListUtil.xs in Scalar-List-Utils-1.52.tar.gz
in thread Puzzled by the ListUtil.xs in Scalar-List-Utils-1.52.tar.gz

... The first blank line after the keyword will terminate the code block

One of the the joys of having Inline::C write your XS files for you is that you never need to read the XS docs.
On the downside, if you then start messing around with the code in an XS file that was *not* created by Inline::C, you might end up asking a dumb question.

Thanks NetWallah, dave_the_m.

Cheers,
Rob
  • Comment on Re^2: Puzzled by the ListUtil.xs in Scalar-List-Utils-1.52.tar.gz

Replies are listed 'Best First'.
Re^3: Puzzled by the ListUtil.xs in Scalar-List-Utils-1.52.tar.gz
by NetWallah (Canon) on Aug 25, 2019 at 20:38 UTC
    That certainly was NOT a dumb question.

    It made me research XS and increased my awareness and knowledge of XS by an order of magnitude.

    Unfortunately, 0 * 10 **1 still == 0.

    Your last comment made me go lookup Inline::C, to try to understand how to generate XS from that.

    I did not see any links to examples and documentation of that use case.

    There is a brief mention in the Inline::C cookbook , but I was looking for some sort of tutorial. Can anyone point to a simple module that was developed this way, so I can study that as an example ?

                    "From there to here, from here to there, funny things are everywhere." -- Dr. Seuss

      When you run an Inline::C script with the CLEAN_AFTER_BUILD=>0; configure option you can then go into the _Inline/build directory and examine the files that Inline::C has generated - which includes the XS file.
      I actually always use InlineX::C2XS - which taps into Inline::C to generate the XS file (and, optionally, Makefile.PL, MANIFEST, test script).

      InlineX::C2XS is a module I wrote - it suits me but might not be to everyone's liking.
      There's a demo in the source(in the demos/context folder).
      The build.pl script therein (which is the script that you run) begins with use InlineX::C2XS qw(c2xs context context_blindly);.
      I think that needs to be changed to use InlineX::C2XS qw(c2xs context); - which is something I should fix :-(

      Cheers,
      Rob

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-18 10:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found