in reply to Re: External C function called through XS not Doing The Right Thing
in thread [SOLVED (workaround)]: External C function called through XS not Doing The Right Thing

Hi

? Are you sure about  "V0C*", ?

You really want V An unsigned long (32-bit) in "VAX" (little-endian) order. Maybe you mean "C0" as in character mode?

  • Comment on Re^2: External C function called through XS not Doing The Right Thing
  • Download Code

Replies are listed 'Best First'.
Re^3: External C function called through XS not Doing The Right Thing
by stevieb (Canon) on Mar 10, 2017 at 02:15 UTC

    I am not 100% sure, I've tried a few things. I just know that with "V0C*", I get the exact same parameters from a C program as I do with the Perl script in the called function.

    I'll re-review the pack documentation now that I at least have a workaround.

      After reviewing the docs, because the function accepts an unsigned char array[8], I went with pack "C[8]", ...;, as from what I can tell, that's most appropriate.

      This didn't solve the initial issue, but thanks for pointing that out!