in reply to Odd behavior with a "vertical tab" character

Not that I am ready to catch your error (please show a place where your subroutine "Raw" is called), just a few thoughts:
  1. did you checked that your uid, attr, category are in correct order? I noticed that different subs have different order for them. This will not directly cause sympthoms you described, but I thought may be you did a typo here?
  2. please show a place where your "Raw" method is called (as I already mentioned)

Best wishes,
Courage, the Cowardly Dog

Replies are listed 'Best First'.
Re: Odd behavior with a "vertical tab" character
by hacker (Priest) on Nov 05, 2002 at 18:19 UTC
    I'm not calling "Raw" directly in my code, but here is the relevant structure from Pilot.xs itself:
    #define PackRaw\ {\ HV * h;\ if (SvRV(data) &&\ (SvTYPE(h=(HV*)SvRV(data))==SVt_PVHV)) {\ int count;\ PUSHMARK(sp);\ XPUSHs(data);\ PUTBACK;\ count = perl_call_method("Raw", G_SCALAR);\ SPAGAIN;\ if (count != 1) {\ SV ** s = hv_fetch(h, "raw", 3, 0);\ if (s)\ data = *s;\ } else {\ data = POPs;\ PUTBACK;\ }\ }\ }
      While I am not ready to point you to an exact place of an error (and do not expect me to, as we still have not enough information), but several notes I will do in my humble tries to step forward.
      1. "perl_call_method" call is 100% not portable between different installations of perl, you should use "call_method" and let "perl.h" to correctly prefix it. You're in danger of facing hard-to-fix errors if you're just following requests of your linker.
      2. Is your extra PUTBACK; at the very end of "PackRaw" macro is intentional?
      3. (most important point) As logic says, your code should not call "Raw" method at all, because your macro first checks for "SvRV" and will not suffice for sure. Is there any other place where your "Raw" method is called? Can you output a call trace?

      Courage, the Cowardly Dog