in reply to Re^2: XS: Manipulating refcounts
in thread XS: Manipulating refcounts

Anytime you return an SV* from an Inline C function, it creates an XS wrapper that calls sv_2mortal() on your return value.

I don't think this has anything to do with Inline::C. I think it's something that xsubpp does in creating the C file from the XS file. If I'm not mistaken, you'll get exactly the same thing in a normal XS environment (ie even of you're not using Inline::C).

Cheers,
Rob

Replies are listed 'Best First'.
Re^4: XS: Manipulating refcounts
by creamygoodness (Curate) on Sep 19, 2006 at 11:59 UTC

    Yep. It was imprecise of me to attribute the action to Inline::C, when in reality the action is performed by xsubpp on orders from Inline::C.

    --
    Marvin Humphrey
    Rectangular Research ― http://www.rectangular.com