in reply to Re^2: 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

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

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

Replies are listed 'Best First'.
Re^4: Puzzled by the ListUtil.xs in Scalar-List-Utils-1.52.tar.gz
by pryrt (Abbot) on Aug 25, 2019 at 20:54 UTC
Re^4: Puzzled by the ListUtil.xs in Scalar-List-Utils-1.52.tar.gz
by syphilis (Archbishop) on Aug 25, 2019 at 21:32 UTC
    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