in reply to question on Inline::C-Cookbook

See also odd line in windows and especially Re^12: odd line in windows.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: question on Inline::C-Cookbook
by syphilis (Archbishop) on Feb 20, 2014 at 11:44 UTC
    especially Re^12: odd line in windows

    I've just replaced (in git) the old rendition with the one that BrowserUk linked to (written by ikegami).

    Nothing really wrong with the older version - works fine, and is quite comprehensible once you understand what newSVrv() does.
    But this amended version is more readily digestible ... and so it "gets the guernsey".

    Here's hoping that the "if it aint broke don't fix it" principle doesn't jump up and bite me ;-)

    Cheers,
    Rob

      If you haven't already you might want to update ikegami's use of New() to the newer Newx?().


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        If you haven't already you might want to update ikegami's use of New() to the newer Newx?().

        Good idea ... and now done.
        In order to have the demo work with older perls that aren't Newx-aware, I've also prefixed the C code with:
        /* Allocate memory with Newx if it's available - if it's an older perl that doesn't have Newx then we resort to using New. */ #ifndef Newx # define Newx(v,n,t) New(0,v,n,t) #endif
        Cheers,
        Rob